summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * sigproc.cc (child_info::retry_count): Default to 1.Christopher Faylor2012-01-262-1/+5
|
* * syscalls.cc (gethostid): Simplify. Just fetch MachineGuid andCorinna Vinschen2012-01-232-114/+24
| | | | create hash from there.
* * fhandler.h (fhandler_fifo::arm): Declare new function.Christopher Faylor2012-01-224-20/+49
| | | | | | | | | * fhandler_fifo.cc (fhandler_fifo::arm): Define new function. (fhandler_fifo::open): Fix handling of RDWR pipes to avoid opening a second handle. Use arm() function to set events. (fhandler_fifo::raw_read): Correctly go into "connect again logic" when we detect another writer is available. Use arm() function to set event. * pipe.cc (fhandler_pipe::create): Add more detail to debugging output.
* clarify wordingChristopher Faylor2012-01-221-1/+1
|
* * cygheap.h (cygheap_fdmanip::release): Simplify.Christopher Faylor2012-01-225-28/+19
| | | | | | | | * dtable.cc (dtable::release): Make void again. Skip not_open check since it is guaranteed to be open. Don't bother deleting here since actual deletion will be handled in cygheap_fdget::~cygheap_fdget. * dtable.h (dtable::release): Make void again. * syscalls.cc (dup2): Bump fhandler use count on successful dup.
* * cygheap.h (cygheap_fdget::~cygheap_fdget): Simplify now that refcnt reportsChristopher Faylor2012-01-227-16/+36
| | | | | | | | | | | reference count changes itself. * fhandler.cc (fhandler_base::reset): Set _refcnt to 0. * fhandler.h (fhandler_base::refcnt): Report refcnt when debugging. * select.cc (cygwin_select): Set return_on_signal to indicate when select should be interrupted. (select_stuff::wait): Keep looping unless return_on_signal is set. * select.h (select_stuff::return_on_signal): New variable. (select_stuff::select_stuff): Zero return_on_signal.
* * fhandler.h (fhandler_registry::opendir): Declare.Corinna Vinschen2012-01-203-0/+14
| | | | * fhandler_registry.cc (fhandler_registry::opendir): New function.
* Document support of printf %m conversion flag.Yaakov Selkowitz2012-01-131-0/+3
|
* * include/cygwin/config.h (_GLIBC_EXTENSION): Define.Yaakov Selkowitz2012-01-132-0/+5
|
* Document tgmath.h.Yaakov Selkowitz2012-01-121-0/+2
|
* * spawn.cc (child_info_spawn::worker): Delete debugging.Christopher Faylor2012-01-112-2/+4
|
* Update copyright on all files checked in so far this year.Christopher Faylor2012-01-1113-38/+54
| | | | | | | | | | | | | | | | | * fhandler.h: Use #pragma once rather than ifdef guards. (fhandler_console::tc_getpgid): Return our pgid if we have never opened a console. * fork.cc: Rearrange includes to accommodate fhandler.h use of pinfo.h. * sigproc.cc: Ditto. * spawn.cc: Ditto. (child_info_spawn::worker): Query myself->pgid rather than calling expensive function. * thread.h: Use #pragma once rather than ifdef guards. * pinfo.h: Use #pragma once rather than ifdef guards. (pinfo::remember): Don't define if sigproc.h has not been included. (pinfo::reattach): Ditto. * sigproc.h: Use #pragma once rather than ifdef guards. Use different test to see if pinfo.h has been included.
* * include/cygwin/process.h: Move here from newlib.Corinna Vinschen2012-01-095-6/+57
| | | | | | | * exec.cc: Change include of process.h to reflect the fact that it's now in the include/cygwin subfolder. * spawn.cc: Ditto. * syscalls.cc: Ditto.
* * miscfuncs.cc (thread_wrapper): Make sure stack is 16 byte alignedCorinna Vinschen2012-01-092-1/+10
| | | | to make gcc-3 compiled pthread applications happy.
* * dtable.cc (dtable::stdio_init): Always initialize console when we have one.Christopher Faylor2012-01-085-33/+32
| | | | | | | | | | * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Use a better method to print tty name for debugging. (fhandler_termios::bg_check): Ditto. * pinfo.cc (_pinfo::set_ctty): Remove leftover debugging stuff. Simplify behavior when setting tty's sid and pgid to avoid overwriting previously set values. * spawn.cc (ch_spawn): Cosmetic change.
* Add my recent API additions.Yaakov Selkowitz2012-01-081-1/+4
|
* * cygwin.din (pthread_sigqueue): Export.Yaakov Selkowitz2012-01-066-1/+31
| | | | | | | * posix.sgml (std-gnu): Add pthread_sigqueue. * thread.cc (pthread_sigqueue): New function. * include/thread.h (pthread_sigqueue): New function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * path.cc (get_current_dir_name): Avoid memory leak. Don't return PWD contentsChristopher Faylor2012-01-022-10/+14
| | | | if directory doesn't actually exist.
* * cygwin.din (get_current_dir_name): Export.Yaakov Selkowitz2012-01-015-1/+31
| | | | | | * path.cc (get_current_dir_name): New function. * posix.sgml (std-gnu): Add get_current_dir_name. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* Bump ChangeLogChristopher Faylor2012-01-012-5318/+5318
|
* Add a couple other items which have been changed since initial call for testingChristopher Faylor2011-12-311-0/+10
|
* Initial checkin of text Corinna sent to cygwin-announce.Christopher Faylor2011-12-311-0/+110
|
* * cygwin.din (getpt): Export.Yaakov Selkowitz2011-12-306-1/+19
| | | | | | | * posix.sgml (std-gnu): Add getpt. * tty.cc (getpt): New function. * include/cygwin/stdlib.h [!__STRICT_ANSI__] (getpt): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * thread.cc: Mark pthread_rwlock_timedrdlock andYaakov Selkowitz2011-12-302-2/+8
| | | | | pthread_rwlock_timedwrlock as not yet implemented in the list of cancellation points.
* * fhandler_dsp.cc (fhandler_dev_dsp::fhandler_dev_dsp): Set up device.Christopher Faylor2011-12-253-2/+8
| | | | * syscalls.cc (open): Very minor formatting tweak.
* * path.cc (struct symlink_info): Add bool argument to declaration ofCorinna Vinschen2011-12-242-17/+40
| | | | | | | | | | check_reparse_point. (symlink_info::check_reparse_point): Add bool argument to indicate remote drive. Handle STATUS_PENDING. Don't evaluate junctions on remote drives. Fix comments. (symlink_info::check): Drop check for is_remote_drive and associated comment here. Add fs.is_remote_drive as second parameter to check_reparse_point call.
* * pinfo.cc (pinfo_basic::pinfo_basic): Fix formatting. Set uid and gidCorinna Vinschen2011-12-232-1/+10
| | | | | to default values to accommodate early initialization of shared user info. Add comment.
* * spawn.cc (child_info_spawn::worker): Add CREATE_BREAKAWAY_FROM_JOBCorinna Vinschen2011-12-222-2/+18
| | | | | to c_flags only if current process is member of a job and breakaway is allowed.
* * external.cc (cygwin_internal): Implement CW_ALLOC_DRIVE_MAP,Corinna Vinschen2011-12-227-165/+217
| | | | | | | | | | | | | | | CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP. * fhandler_process.cc: Include mount.h. (get_volume_path_names_for_volume_name): Move to mount.cc. (struct dos_drive_mappings): Ditto. * mount.cc (get_volume_path_names_for_volume_name): Move here. (dos_drive_mappings::dos_drive_mappings): Ditto. (dos_drive_mappings::fixup_if_match): Ditto. (dos_drive_mappings::~dos_drive_mappings): Ditto. * mount.h (class dos_drive_mappings): Declare her. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_ALLOC_DRIVE_MAP, CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP. * include/cygwin/version.h: Bump API minor number.
* * fhandler_process.cc: Drop unneeded includes.Corinna Vinschen2011-12-222-2/+4
|
* Throughout use wincap.allocation_granularity instead of getpagesize.Corinna Vinschen2011-12-2214-308/+331
| | | | | | | | | | | | | | | | | | | | | | | | Throughout use wincap.page_size instead of getsystempagesize. Throughout use "status" as variable name to hold NTSTATUS values. * fhandler_mem.cc: Check for NT_SUCCESS rather than for STATUS_SUCCESS. Fix debug_printf output. Rectify long statements. Fix comment formatting. * fhandler_proc.cc: Ditto. (format_proc_swaps): Drop useless test for ERROR_PROC_NOT_FOUND. * fhandler_process.cc: Ditto as in fhandler_mem.cc. (get_process_state): Rearrange allocation loop. Use malloc/realloc. (get_mem_values): Fix potential NULL pointer usage. Drop unused variable. * pinfo.cc (winpids::enum_processes): Handle low memory gracefully. * sec_auth.cc (get_priv_list): Drop local variable ret. * shared.cc (memory_init): Drop outdated call to getpagesize. * syscalls.cc (getsystempagesize): Remove. * sysconf.cc: Check for NT_SUCCESS rather than for STATUS_SUCCESS. (sysinfo): Constify sizeof_stodi. Drop useless test for ERROR_PROC_NOT_FOUND. * thread.cc (pthread_getattr_np): Cast pointers to uintptr_t rather than to int for pointer arithmetic. * winsup.h (getsystempagesize): Drop declaration.
* * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use correct value inChristopher Faylor2011-12-212-1/+6
| | | | switch statement.
* * dcrt0.cc (_dll_crt0): Rephrase comments. Set $ebp to NULL, as inCorinna Vinschen2011-12-213-9/+20
| | | | | | the pthread stack setup. * wow64.cc (wow64_revert_to_original_stack): Rephrase some comments. Return _tlsbase-16 rather than _main_tls-4 so as not to waste stack.
* * syscalls.cc (rename): Fix typo in comment. Fix condition to handleCorinna Vinschen2011-12-192-3/+14
| | | | | | the case oldpath is no .lnk symlink and newpath points to an existing .lnk symlink or .exe file and no explicit .lnk suffix has been given in oldpath. Add a comment to explain.
* * dcrt0.cc (dll_crt0_0): Check for wincap.wow64_has_secondary_stackCorinna Vinschen2011-12-196-17/+53
| | | | | | | | | | | | | | | rather than for wincap.is_wow64. Accommodate name change from wow64_has_64bit_parent to wow64_needs_stack_adjustment. Align comment. (_dll_crt0): Ditto. * wincap.h (wincaps::wow64_has_secondary_stack): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Set wow64_has_secondary_stack to false on non-64 bit systems. * wow64.cc (wow64_needs_stack_adjustment): Rename (hopefully the last time) from wow64_has_64bit_parent. (wow64_eval_expected_main_stack): Fix comment to reflect real life. (wow64_test_for_64bit_parent): Fix comment. * wow64.h (wow64_needs_stack_adjustment): Accommodate new name.
* clarify entryChristopher Faylor2011-12-191-1/+1
|
* * fhandler.cc (fhandler_base::close): Move setting isclosed() from here toChristopher Faylor2011-12-183-22/+49
| | | | | | | | | | | | closed(). (fhandler_base_overlapped::close): Correct comment. (fhandler_base_overlapped::destroy_overlapped): Signal overlapped event before closing it to potentially wake up a waiting thread. (fhandler_base_overlapped::wait_overlapped): Expand setting of err when closed to encompass non-signal event. Test for a cancel event before making nonblocking decisions. * syscalls.cc (close): Set closed flag here so that any concurrently executing functions will be notified ASAP.
* Clean up whitespace.Christopher Faylor2011-12-1731-86/+85
|
* * dcrt0.cc (_dll_crt0): Fix formatting.Corinna Vinschen2011-12-172-6/+7
|
* * wow64.cc (wow64_revert_to_original_stack): Fix comment.Corinna Vinschen2011-12-173-4/+9
| | | | * wow64.h (wow64_respawn_process): Declare noreturn.
* * exceptions.cc (set_signal_mask): Remove useless debugging output.Christopher Faylor2011-12-175-17/+22
| | | | | | | | * fhandler.cc (fhandler_base::write): Ditto. (fhandler_base_overlapped::close): Cancel any ongoing I/O before closing. * syscalls.cc (write): Default to always reporting all writes in strace output via syscall_printf. * wait.cc (wait4): Fix debugging output. Use standard syscall leaver output.
* Fix formatting. Fix typo.Christopher Faylor2011-12-171-3/+2
|
* Implement fhandler reference counting.Christopher Faylor2011-12-179-46/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygheap.h (cygheap_fdmanip::release): Make virtual. (cygheap_fdnew::~cygheap_fdnew): New destructor increments reference count when fd has been allocated. (cygheap_fdget::fh): New (old?) field. (cygheap_fdget::cygheap_fdget): Increment reference count when we've found an active fd. Set fh appropriately. (cygheap_fdget::~cygheap_fdget): Decrement reference count when appropriate. Delete fh if reference count goes to zero. (cygheap_fdget::release): New function. Do more bookkeping on release. * dtable.cc (dtable::release): Change from void to boolean return. Only delete the fhandler when its reference count is <= 0 (this should be a fairly unusual case). Return true if fhandler has been deleted. (cygwin_attach_handle_to_fd): Increment reference count when fh is assigned. (dtable::init_std_file_from_handle): Ditto. * dtable.h (dtable::release): Change return to boolean. * fhandler.cc (fhandler_base::fhandler_base): Set new isclosed flag to false. Set _refcnt to zero. (fhandler_base::close): Simplify paranoid debugging output. Set new isclosed() flag. (fhandler_base_overlapped::wait_overlapped): Use isclosed() flag to avoid querying the exception handle. * fhandler.h (fhandler_base::_refcnt): New field. (fhandler_base::refcnt): New function. (fhandler_base::isclosed): Implement. (fhandler_base::fhandler_base): Set isclosed to false. * syscalls.cc: Remove space after function before parentheses for several strace printfs. (dup): Add standard strace "leaver" code. (dup2): Ditto. (dup3): Ditto. (remove): Ditto. (getpid): Ditto. (getppid): Ditto. (lseek64): Fix strace debugging to correctly use %R. * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Avoid sending signals to other processes if we're debugging since it can cause a deadlock with the calling debugger. * exceptions.cc (_cygtls::call_signal_handler): Add debugging-only strace output.
* * dcrt0.cc (child_info_fork::alloc_stack): Correctly check if theCorinna Vinschen2011-12-163-36/+88
| | | | | | | | | | | | parent stack fits into the child stack. Align comment. * wow64.cc (wow64_eval_expected_main_stack): New function to fetch expected addresses of main thread stack from PE/COFF image header values. (wow64_test_for_64bit_parent): Fix comment. Check current stack against real expected main thread stack addresses. (wow64_revert_to_original_stack): Fix and add comments. Check memory against real expected main thread stack addresses. Use orignal stack if reserved area is >= 256K.
* * gendef (sigdelayed): Remember to pop all of the saved registers.Christopher Faylor2011-12-162-37/+42
| | | | (sigreturn): Add "leave" label.
* * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Fix unresolvedChristopher Faylor2011-12-162-1/+6
| | | | access of wores in successful situations.
* * Makefile.in (DLL_OFILES): Add wow64.o.Corinna Vinschen2011-12-165-87/+258
| | | | | | | | | | | | | | | | | | | | | | | | * dcrt0.cc (CYGWIN_GUARD): Drop execute permission for stack, it's not used for stacks by the OS either. (child_info_fork::alloc_stack_hard_way): Ditto. (child_info_fork::alloc_stack): Don't alloc_stack_hard_way under WOW64 if forked from a 64 bit parent. Set child's StackBase to parent's StackBase. Add comments to explain why. (wow64_respawn): Move to wow64.cc. (wow64_started_from_native64): Move to wow64.cc. (respawn_wow64_process): Move to wow64.cc. (dll_crt0_0): Drop wow64_test_stack_marker and move stack test into wow64_test_for_64bit_parent function. Don't return early if WOW64 process has been started from native 64 bit process. (_dll_crt0): Implement moving stack for WOW64 processes started from native 64 bit process. * wow64.cc: New file. (wow64_has_64bit_parent): Rename from wow64_respawn. (wow64_test_for_64bit_parent): Rename from wow64_started_from_native64. Change comment. (wow64_revert_to_original_stack): New function. (wow64_respawn_process): Rename from respawn_wow64_process for symmetry. * wow64.h: New file.
* * exceptions.cc (_cygtls::call_signal_handler): Fix debugging to not go toChristopher Faylor2011-12-165-20/+38
| | | | | | | | console. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Add temporary kludge to work around problem of make closing a handler while it is being read. * gendef (sigdelayed): Don't call a function if sig has been cleared. * sigproc.h (cygwait): Simplify slightly.
* Don't leave Windows 2000 behind.Corinna Vinschen2011-12-143-2/+49
| | | | | | | | | | | * autoload.cc (GetSystemWow64DirectoryW): Define. (GetVolumePathNamesForVolumeNameW): Define. * fhandler_process.cc (get_volume_path_names_for_volume_name): New static function to workaround missing GetVolumePathNamesForVolumeNameW function in Windows 2000. (dos_drive_mappings::dos_drive_mappings): Call get_volume_path_names_for_volume_name instead of GetVolumePathNamesForVolumeNameW.
* add missing changeChristopher Faylor2011-12-131-3/+0
|