ce3318344c* exceptions.cc (set_signal_mask): Remove useless debugging output. * 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.
Christopher Faylor
2011-12-17 07:01:21 +0000
60cd6a7798Fix formatting. Fix typo.
Christopher Faylor
2011-12-17 00:15:31 +0000
ca35d41cecImplement fhandler reference counting. * 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.
Christopher Faylor
2011-12-17 00:03:31 +0000
6eee66418c* dcrt0.cc (child_info_fork::alloc_stack): Correctly check if the 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.
Corinna Vinschen
2011-12-16 18:09:43 +0000
56d06b9af3* gendef (sigdelayed): Remember to pop all of the saved registers. (sigreturn): Add "leave" label.
Christopher Faylor
2011-12-16 16:32:25 +0000
6bd406f9ed* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Fix unresolved access of wores in successful situations.
Christopher Faylor
2011-12-16 16:29:34 +0000
344e68b166* Makefile.in (DLL_OFILES): Add wow64.o. * 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.
Corinna Vinschen
2011-12-16 11:58:03 +0000
08e4b6acb7* exceptions.cc (_cygtls::call_signal_handler): Fix debugging to not go to 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.
Christopher Faylor
2011-12-16 05:27:15 +0000
e553b822e22011-12-15 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston
2011-12-15 22:59:14 +0000
8e0346d1372011-12-15 Konrad Eisele <konrad@gaisler.com>
Jeff Johnston
2011-12-15 22:58:40 +0000
e74758408eDon't leave Windows 2000 behind.
Corinna Vinschen
2011-12-14 20:23:27 +0000
50e970d1b12011-12-13 Richard Earnshaw <rearnsha@arm.com> Thomas Klein <th.r.klein@web.de>
Jeff Johnston
2011-12-13 22:45:12 +0000
e480bc80c32011-12-13 Richard Earnshaw <rearnsha@arm.com> Thomas Klein <th.r.klein@web.de>
Jeff Johnston
2011-12-13 22:40:45 +0000
f46fcfebd1Factor common code from subdirectory makefiles into Makefile.comm.in
Keith Marshall
2011-12-13 20:46:53 +0000
5cc68751fdPrepare for factoring out common makefile code.
Keith Marshall
2011-12-13 20:10:42 +0000
eab07b8789add missing change
Christopher Faylor
2011-12-13 20:08:10 +0000
45d7b637fa* dcrt0.cc (init_windows_system_directory): Record system_wow64_directory information. * exceptions.cc (_cygtls::inside_kernel): Modernize comment. Consider executing a DLL from the Wow64 directory as being "in the kernel". (_cygtls::call_signal_handler): For now, only deal with main_tls signals if main_tls is known to be executing in the cygwin DLL. To more closely emulate linux, consider the operation to be restartable if not executing in the main thread. * globals.cc (windows_system_directory): Remove NO_COPY. (windows_system_directory_length): Ditto. (system_wow64_directory): New variable. (system_wow64_directory_length): Ditto. * select.cc (cygwin_select): Don't issue a EINTR on non-main threads since that seems to be what Linux does. Add missing break to signal case/switch. (select_stuff::wait): Don't issue a EINTR on non-main threads since that seems to be what Linux does. Remove now-unneeded accommodation for WAIT_IO_COMPLETION. Add a comment. * sigproc.h (cygwait): Ditto. Don't return if signal_received noticed and it's not the main thread. * signal.cc (sigprocmask): Add standard syscall debug stuff. * thread.cc (pthread_sigmask): Ditto.
Christopher Faylor
2011-12-13 20:06:31 +0000
5250e27f71* path.cc (conv_path_list): Fix a condition. (cygwin_conv_path): Revert WIN_A conversion to current locale codeset.
Corinna Vinschen
2011-12-13 14:53:10 +0000
3780d205cd* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Call file_get_fnoi instead of NtQueryInformationFile. * path.cc (file_get_fnoi): New helper function to collect a FILE_NETWORK_OPEN_INFORMATION block. (symlink_info::check): Call file_get_fnoi rather than NtQueryInformationFile to collect a FILE_NETWORK_OPEN_INFORMATION block. * path.h (file_get_fnoi): Declare.
Corinna Vinschen
2011-12-13 11:54:28 +0000
74365d9715* times.cc (hires_ns::resolution): Don't return less than 1.
Corinna Vinschen
2011-12-13 11:38:12 +0000
8cb58e8566* cygthread.h (cygthread::name): Very minor formatting tweak. * exceptions.cc (_cygtls::call_signal_handler): Add paranoid debugging output. * sigproc.h (cygwait): Call signal handler when signal is detected and loop as appropriate. * fhandler.h (fhandler_base_overlapped::wait_return): Remove overlapped_signal. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove restartable signal accommodations in light of cygwait improvements. (fhandler_base_overlapped::raw_read): Remove now-obsolete signal loop behavior. (fhandler_base_overlapped::raw_write): Ditto. * fhandler_console.cc (fhandler_console::read): Ditto. * fhandler_serial.cc (fhandler_serial::raw_read): Ditto. (fhandler_serial::raw_write): Ditto. * fhandler_tty.cc (fhandler_pty_slave::read): Ditto. * ioctl.cc (ioctl): Add standard syscall introducer and leaver debug output.
Christopher Faylor
2011-12-13 04:11:48 +0000
a7ea1550ff* faq-using.xml: Remove obsolete entry about the standard console window. * new-features.sgml: Remove obsolete entry which references cygwin.bat. * setup-net.sgml: Clarify new shortcut behavior for the "Cygwin Terminal".
Christopher Faylor
2011-12-13 03:54:59 +0000
01ba99e8cd* fhandler_process.cc (dos_drive_mappings): Partially rewrite to handle volumes mounted into juntion points correctly.
Corinna Vinschen
2011-12-12 21:38:08 +0000
cdce73f183* dcrt0.cc (wow64_respawn): New static variable. (wow64_started_from_native64): New function to check if a WOW64 process got started from a native 64 bit process. (respawn_wow64_process): New function to respawn process. (dll_crt0_0): When started from a native parent, check if parent is a 64 bit process. If so, return early. (_dll_crt0): Respawn WOW64 process here if required. * init.cc (respawn_wow64_process): Remove. (dll_entry): Rename wow64_test_stack_marker to test_stack_marker. Drop WOW64 test here.
Corinna Vinschen
2011-12-12 10:16:53 +0000
b11797ad17* pipe.cc (fhandler_pipe::create): Use debug_printf to print debugging info since this isn't a "syscall". (pipe_worker): New function created from _pipe(). (_pipe): Use pipe_worker to create a pipe. Use standard syscall strace reporting on exit. (pipe): Ditto. (pipe2): Ditto.
Christopher Faylor
2011-12-12 01:22:29 +0000
fc25f200f4* select.cc (select_stuff::wait): Very minor formatting fix. (peek_windows): Report on HWND handle used in queries. * select.h: Update copyright. * sigproc.h (cygwait): Eliminate multi-argument variety since more general implementation may cause odd problems in select. Also force to always be inline.
Christopher Faylor
2011-12-11 01:25:20 +0000
14bb21fe45Correct defective configure checkin
Keith Marshall
2011-12-10 21:43:09 +0000
8a929d731ffix another typo in ChangeLog
Christopher Faylor
2011-12-10 18:34:00 +0000
83ebb09239* sigproc.h (cygwait): Delete duplicate va_start and add matching va_end.
Christopher Faylor
2011-12-10 18:12:28 +0000
bc1d321c57Add ChangeLog entry for previous change and revert erroneously checked in changes to dcrt0.cc and init.cc
Christopher Faylor
2011-12-10 18:10:22 +0000
dfbab81589Clarify entry
Christopher Faylor
2011-12-10 17:40:20 +0000
51d406aaa7Build system clean-up (phase 1)
Keith Marshall
2011-12-10 17:24:25 +0000
c1dedea603* exceptions.cc (ctrl_c_handler): YA in a series or reversions. Put back _my_tls.remove along with a comment. (sigpacket::process): Remove code which now causes a gdb deadlock. * sigproc.cc (_cygtls::signal_exit): Signal debugger with signal number earlier.
Christopher Faylor
2011-12-10 01:33:56 +0000
83b25b0eb7* dllfixdbg: Work around annoying gdb warning about missing .gnu_debuglink.
Christopher Faylor
2011-12-09 17:46:12 +0000
57af01797eRename cygWFMO to cygwait throughout and use the magic of polymorphism to "wait for stuff". * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use simplified arg form of cygwait. * fhandler_console.cc (fhandler_console::read): Ditto. * fhandler_audio.cc (fhandler_dev_dsp::Audio_out::waitforspac): Ditto. (fhandler_dev_dsp::Audio_in::waitfordata): Ditto. * fhandler_fifo.cc (fhandler_fifo::wait): Ditto. * fhandler_serial.cc (fhandler_serial::raw_read): Ditto. (fhandler_serial::raw_write): Ditto. * select.cc (cygwin_select): Ditto. * sigproc.h (cygwait): Rename from cygWFMO. Define two argument and single argument forms of this function. * fhandler_tty.cc (fhandler_pty_slave::open): Use method to query if tty is open. (fhandler_pty_slave::read): Send SIGHUP when master is detected as closed. (fhandler_pty_common::close): Close input_available_event in callers since master may need to signal it first. (fhandler_pty_master::close): Lie and set input_available_event when closing, then close input_available_event. (fhandler_pty_slave::close): Close input_available_event explicitly here. * tty.h (tty::is_master_closed): Declare new method.
Christopher Faylor
2011-12-09 16:02:56 +0000
aaaaefc090Revert erroneous checkin
Christopher Faylor
2011-12-09 06:57:21 +0000
e35f1d1655* sigproc.cc (signal_exit): Revert reversion of 2011-12-04 change since, otherwise, you see hangs when the signal pipe is closed.
Christopher Faylor
2011-12-09 06:49:10 +0000
8714982cef* select.cc (cygwin_select): Fifth time is the charm.
Christopher Faylor
2011-12-09 03:19:41 +0000
9b80fa0f92bfd: 2011-12-08 Andrew Pinski <apinski@cavium.com> Adam Nemet <anemet@caviumnetworks.com>
Andrew Pinski
2011-12-08 20:47:27 +0000
203f973789* select.cc (cygwin_select): Make sure that 0 is returned when sel.wait times out.
Christopher Faylor
2011-12-08 20:24:33 +0000
2398bcaea4* include/sys/wait.h: Add in all c++ functions.
Christopher Faylor
2011-12-08 18:24:24 +0000
263acfa613* include/sys/wait.h: Ensure that C++ functions are only used when using C++.
Christopher Faylor
2011-12-08 06:58:10 +0000
986da7853d* select.cc (cygwin_select): Make sure that poll is called when appropriate.
Christopher Faylor
2011-12-08 06:49:56 +0000
5025bf330b* dll_init.cc (dll_dllcrt0): Don't try to initialize dll data if we're dynamically loaded since fork() doesn't work in that scenario anyway. (dll_dllcrt0_1): Don't accommodate dynamically loaded dlls. * exceptions.cc (ctrl_c_handler): Don't lock the process; there's too much risk of deadlock. * sigproc.cc (_cygtls::remove_wq): Don't try to remove anything from the waitq if there is obviously nothing there. * strace.cc (strace::activate): Allow stracing dynamically loaded cygwin1.dll.
Christopher Faylor
2011-12-08 06:17:49 +0000
069e637c0e* fhandler_termios.cc (tty_min::kill_pgrp): Don't send __SIGSETPGRP since presumably we are already initialized.
Christopher Faylor
2011-12-08 04:09:22 +0000
d4f8245048* select.cc (cygwin_select): Add common introducer and leaver debug output. (select_stuff::poll): Remove unneeded debugging.
Christopher Faylor
2011-12-07 23:14:47 +0000
13b4946d2a* exceptions.cc (ctrl_c_handler): Remove _my_tls.remove since it can cause deadlocks during exec and will eventually be handled anyway.
Christopher Faylor
2011-12-07 13:54:54 +0000
47de562e7c* spawn.cc (child_info_spawn::worker): Add CREATE_BREAKAWAY_FROM_JOB to all spawned processes. Explain why.
Corinna Vinschen
2011-12-07 10:48:17 +0000
9bab9bfeb5* fhandler_fifo.cc (fhandler_fifo::wait): Fix stupid typo and actually wait for the handle.
Christopher Faylor
2011-12-07 03:07:25 +0000
a88d73b52b* libc/iconv/Makefile.am (stmp-def): Use $(MAKE) rather than make. * libc/iconv/Makefile.in: Regenerate.
Corinna Vinschen
2011-12-06 10:45:05 +0000
08d944e19f* sigproc.cc (close_my_readsig): New function. (_cygtls::signal_exit): Close my_readsig via close_my_readsig(), avoiding communication with the signal pipe. (wait_sig): Close my_readsig via close_my_readsig().
Christopher Faylor
2011-12-05 15:59:06 +0000
8912b2e56f* mmap.cc (mlock): Replace LOCK_VM_IN_WSL with correct MAP_PROCESS. (munlock): Ditto. * ntdll.h: Rearrange to have all preprocessor definitions at the start of the file. Add comments to each definition block. (MAP_PROCESS): Rename from LOCK_VM_IN_WSL. (MAP_SYSTEM): Rename from LOCK_VM_IN_RAM.
Corinna Vinschen
2011-12-05 15:46:26 +0000
536e00784ecorrect name of function
Christopher Faylor
2011-12-04 18:40:51 +0000
79e59d522a* sigproc.cc (cygWFMO): Don't assume that cancellable event is always available. * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::waitforspace): Use cygWFMO instead of WaitForMultipleObjects. (fhandler_dev_dsp::Audio_in::waitfordata): Ditto. * fhandler_fifo.cc (fhandler_fifo::wait): Ditto. * fhandler_serial.cc (fhandler_serial::raw_read): Ditto. (fhandler_serial::raw_write): Ditto. * fhandler_tty.cc (fhandler_pty_slave::read): Ditto. * select.cc (cygwin_select): Ditto for degenerate case.
Christopher Faylor
2011-12-04 18:32:00 +0000
8f937028d9* exceptions.cc (exception::handle): Drop abbreviation for "exception" since I never remember what it stands for. (sig_handle_tty_stop): Remove obsolete call to sig_handle_tty_stop. (_cygtls::call_signal_handler): Rework to grab signal information from _main_tls if none is set for _my_tls. Try harder to keep thread locked. (reset_signal_arrived): Delete. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use new cygWFMO call to wait for an event + standard cygwin stuff. Modify debug output to acccomodate new function. * fhandler_console.cc (fhandler_console::read): Replace WaitForMultipleObjects with cygWFMO. * fhandler_socket.cc (get_inet_addr): Add comment. * gendef (_sigdelayed): Remove call to reset_signal_arrived. * sigproc.cc (_cygtls::signal_exit): Don't close my_readsig here unless we're in the signal thread. (create_signal_arrived): Create signal_arrived as auto-reset so that only one thread is woken when a signal arrives. * sigproc.h (cygWFMO): New function. (reset_signal_arrived): Delete declaration.
Christopher Faylor
2011-12-04 17:58:24 +0000
69864e48cb* mmap.cc (mlock): Add standard syscall return value debugging output. (munlock): Ditto. (posix_madvise): Ditto. * signal.cc: Remove obsolete sigcatchers stuff throughout. (sigaction_worker): Add function name parameter and use it to show standard syscall return value debugging output. Also add fault protection. (sigaction): Accommodate extra argument to sigaction_worker. (siginterrupt): Ditto. * syscalls.cc (read): Remove obsolete sigcatchers stuff. (readv): Ditto.
Christopher Faylor
2011-12-03 23:55:21 +0000
6455755743fix incorrectly named file in old ChangeLog entry
Christopher Faylor
2011-12-03 23:49:03 +0000
447354e13c* mmap.cc (mlock): Drop requesting SE_LOCK_MEMORY_PRIVILEGE. Drop outdated comment. Call NtLockVirtualMemory with LOCK_VM_IN_WSL flag. (munlock): Drop requesting SE_LOCK_MEMORY_PRIVILEGE. Call NtUnlockVirtualMemory with LOCK_VM_IN_WSL flag.
Corinna Vinschen
2011-12-03 23:03:15 +0000
b9aa81491fThroughout, remove extra space after function name from debugging output. Throughout, change syscalls to report on return values using new %R format option. * smallprint.cc (__small_vsprintf): Add parsing for %R to report on return values and possible errno from syscalls. * errno.cc (errmap): Add PRIVILEGE_NOT_HELD. * fhandler_tty.cc (fhandler_pty_master::setup): When creating a thread use shorter name to reduce debuggging output. * select.cc (start_thread_pipe): Ditto. (start_thread_serial): Ditto. (start_thread_socket): Ditto. (start_thread_mailslot): Ditto. * sigproc.cc (talktome): Ditto.
Christopher Faylor
2011-12-03 21:43:27 +0000
8b25478267* fhandler.cc (fhandler_base::open): Fix comment a bit more.
Corinna Vinschen
2011-12-03 20:35:36 +0000
a91ef48390sim: export cb_get_string for people to use
Michael Frysinger
2011-12-03 18:39:43 +0000
71148bfcd5* Makefile.in (cygpath.exe): Add -luserenv to ALL_LDFLAGS. * cygpath.cc: Throughout, use cygwin_conv_path WIN_W rather than WIN_A conversion. (get_long_path_name_w32impl): Remove. (get_long_name): Drop pre-Windows 2000 accommodations. Just call GetLongPathNameW here directly. (get_special_folder): Convert first parameter to WCHAR buffer pointer. Drop conversion of result from WCHAR * to char *. (do_sysfolders): Accommodate change to get_special_folder and only convert result to char * last. Drop pre-Windows 2000 accommodations and just call GetProfilesDirectoryW directly. Replace call to GetWindowsDirectoryW with call to GetSystemWindowsDirectoryW. Just call GetShortPathNameW directly. (do_pathconv): Simplify buffer handling.
Corinna Vinschen
2011-12-02 16:15:26 +0000
a887cf0ef5* path.cc (conv_path_list): Take cygwin_conv_path_t as third parameter. Allow all types of CCP conversions. Accommodate throughout. (cygwin_conv_path): Use current ANSI or OEM codepage for WIN_A conversions, depending on current file API codepage setting. (cygwin_conv_path_list): Allow all CCP conversion types. * include/sys/cygwin.h (CCP_CONVTYPE_MASK): Add to cygwin_conv_path_t enum for convenience.
Corinna Vinschen
2011-12-02 16:06:10 +0000
13a20f9565* mkgroup.c: Drop support for NT4 domains. * mkpasswd.c: Ditto. (psx_dir): Remove. (current_user): Drop support for -m option. Use $HOME as is since it's a POSIX path anyway. (enum_users): Drop support for -m option. (usage): Mention -m option as ignored. (main): Drop support for -m option. Mark ignored options as deprecated. * utils.sgml (mkpasswd): Remove description of -m option.
Corinna Vinschen
2011-12-01 13:06:13 +0000
1aca2cb5f42011-11-30 Ozkan Sezer <sezero@users.sourceforge.net>
Chris Sutcliffe
2011-12-01 00:24:35 +0000
21224765f12011-11-30 Earnie Boyd <earnie@users.sourceforge.net>
Chris Sutcliffe
2011-12-01 00:13:52 +0000
a1690e62ab2011-11-30 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Chris Sutcliffe
2011-11-30 23:49:46 +0000
23d5544748opcode/ 2011-11-29 Andrew Pinski <apinski@cavium.com>
Andrew Pinski
2011-11-29 20:28:55 +0000
26bb3098fd* sigproc.cc (get_proc_lock): Remove extra NULL check. Return false on failure.
Christopher Faylor
2011-11-29 17:41:01 +0000
6a28849237* sync.cc: Fix comment. * dll_init.cc (dll_list::reserve_space): Use %p rather than %lx to show reserved space.
Christopher Faylor
2011-11-29 17:26:57 +0000
480b13a37a* sigproc.cc (remove_proc): Don't terminate the currently executing thread.
Christopher Faylor
2011-11-29 15:34:49 +0000
d1fc77322f[libgloss] * configure.in: Add rl78. * configure: Regenerate. * rl78: New directory
DJ Delorie
2011-11-29 06:33:49 +0000
806e25759bfix older description
Christopher Faylor
2011-11-29 05:38:12 +0000
c1af7c27eb* locale.cc (print_locale_with_codeset): Fetch Windows path as UNICODE path and convert that to POSIX.
Corinna Vinschen
2011-11-28 17:58:48 +0000
8ae61a8d6c* external.cc (fillout_pinfo): Store program name as POSIX path in ep.progname_long.
Corinna Vinschen
2011-11-28 17:53:18 +0000
c47ec78d7a* ps.cc: Remove all Win 9x considerations. Use psapi functions directly. Drop support for older Cygwin DLLs. Just use progname_long as is since it's already a POSIX path now. Rename "tty" to "pty" as in the Cygwin DLL. Call setlocale to make sure wcstombs does the right thing according to the current locale. * Makefile.in (ps.exe): Link against psapi.dll.
Corinna Vinschen
2011-11-28 17:49:56 +0000
9c29e82edb* pinfo.cc (pinfo::exit): Call TerminateProcess to avoid potential busy loop in ntdll.dll when calling ExitProcess. Only call ExitProcess as a fallback.
Corinna Vinschen
2011-11-28 16:00:07 +0000
0e5d7582d5* init.cc (dll_entry): Revert previous change since it caused inexplicable fork problems.
Christopher Faylor
2011-11-27 19:00:33 +0000
1b60bb36b0Clean up DIRENT errno handling; make it more POSIX conformant.
Keith Marshall
2011-11-26 22:12:51 +0000
d8e7e40416* init.cc (remove): Don't bother calling through thread removal cleanup if we are exiting.
Christopher Faylor
2011-11-26 19:20:13 +0000
4ab568c60c* exceptions.cc (stackdump): Make global. (signal_exit): Move to sigproc.cc. * sigproc.cc (signal_exit): Move here. Declare stackdump extern. Set my_sendsig to indicate that signals are no longer available. (my_readsig): Make Static again. (sig_send): Interpret ERROR_BROKEN_PIPE as ESRCH. Remove special-case EACCESS errno setting, just setting errno generally, even for "its_me" case.
Christopher Faylor
2011-11-26 19:14:22 +0000
1d04c4c6c3* exceptions.cc (sigpacket::process): Move signal_exit processing into... (_cygtls::signal_exit): ...here. Close my_readsig and comment on why. * pinfo.cc (pinfo::exit): Move sigproc_terminate earlier. Set exiting flag in lock_process. * sigproc.cc (my_readsig): Make global. * sync.cc (muto::exiting_thread): Delete. (muto::acquire): Delete #if 0'ed code. * sync.h (muto::exiting_thread): Delete. (set_exiting_thread): Ditto. (lock_process::lock_process): Don't worry about setting the exiting thread since it had no meaning.
Christopher Faylor
2011-11-26 02:35:49 +0000
505bce274f* strace.cc (attach_process): Use NT_SUCCESS to figure out if NtSetInformationProcess succeeded. (handle_output_debug_string): Put back DebugActiveProcess since it seems to still be needed (on my system at least). Detect new format _STRACE_INTERFACE_ACTIVATE_ADDR which informs whether this is a forked process or not. Use that to decide if forkdebug should be handled.
Christopher Faylor
2011-11-24 21:54:41 +0000
e553226cfamissed this in previous checkin
Christopher Faylor
2011-11-24 21:38:17 +0000
ef8bff85be* cygthread.h (cygthread::name): Default name to "main" if we are early in the process of setting up the DLL and no name is known. * dcrt0.cc (initial_env): Remove CYGWIN_SLEEP stuff. (get_cygwin_startup_info): Activate strace here as appropriate. (dll_crt0_0): Move get_cygwin_startup_info as early as possible to avoid missing strace output. * fork.cc (frok::child): Move debugging statement to point where ppid will be set. * pinfo.cc (pinfo::thisproc): Remove obsolete call to strace.hello. Tweak debug output slightly. * select.cc (select_stuff::wait): Allow APCS to be triggered while waiting since we use them now. Report when that happens. * sigproc.cc (child_info::child_info): Use strace.active() rather than strace.attached(). * spawn.cc (child_info_spawn::worker): Only write strace child pid when we know it's a cygwin process. Accommodate change to write_child argument list. * strace.cc (strace::hello): Delete. Move functionality... (strace::activate): ...to here. (mypid): Just use raw GetCurrentProcessId () if myself isn't set. (strace::write_childpid): Don't wait for subproc_ready. Remove arg which was required for it. * include/sys/strace.h (strace::hello): Delete. (strace::write_childpid): Delete first argument.
Christopher Faylor
2011-11-24 21:36:53 +0000
8942ed09ac* child_info.h (CURR_CHILD_INFO_MAGIC): Reset for previous changes. * dcrt0.cc (get_cygwin_startup_info): Signal readiness when stracing since strace::write_child relies on it. Use strace.activate to notify strace process, passing in arg indicating whether we're forked. * sigproc.cc (wait_sig): Accommodate new strace::activate argument. * spawn.cc (child_info_spawn::worker): Oops. Previous suspended test was actually correct. Revert and document. * strace.cc (strace::activate): Send additional flag indicating whether this is an attempt to activate a forked process. (strace::hello): Report on windows pid. * include/sys/strace.h (strace::strace): Make a dummy. (strace::activate): Modify declaration to accept an argument. (strace::write_childpid): Set regparm.
Christopher Faylor
2011-11-24 02:17:55 +0000
5f38ec4681* pipe.cc (fhandler_pipe::create): Avoid derefencing a NULL pointer. * child_info.h (child_info): Reorganize some elements so that the ones which are initialized in a constructor are all together. * sigproc.cc (child_info::child_info): Initialize values via the constructor rather than as C statements and make sure that flags is set to zero initially. * spawn.cc (child_info_spawn::worker): Use iscygwin() test for determining when to send strace info since it is more foolproof than checking the suspend state.
Christopher Faylor
2011-11-23 21:58:43 +0000
9f65451e3e* fhandler.h (fhandler_pipe::create): Rename from the misnamed "create_selectable". Change return to DWORD. (fhandler_pty_common::pipesize): New constant. * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Reflect create_selectable name change. * miscfuncs.cc (CreatePipeOverlapped): Ditto. * pipe.cc (fhandler_pipe::create): Ditto. (fhandler_pipe::create): Rename from the misnamed "create_selectable". Return DWORD. Only set pipe size to default when it is passed in as zero. * fhandler_tty.cc (fhandler_pty_master::setup): Ditto. Use fhandler_pty_common::pipesize rather than a raw constant. * tty.cc (tty::not_allocated): Ditto. * sigproc.cc (sigproc_init): Use create_selectable to create the signal pipe to get a more appropriate message based pipe.
Christopher Faylor
2011-11-23 18:56:57 +0000
cc07096c5c* sigproc.cc (remove_proc): Don't do busy loop when exiting since it doesn't matter.
Christopher Faylor
2011-11-21 21:09:33 +0000