X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=winsup%2Fcygwin%2FChangeLog;h=f51753725abf717a67c6ba645f193c5d2bbe9e20;hb=192c4194f79773665fac6821a48e4068ac4842e5;hp=172dabcc4a34b9e152a09a0a40d069c71af2f39b;hpb=c6fc64fd12ecf693d001b5945350243aa54bcc43;p=pf3gnuchains%2Fpf3gnuchains4x.git diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 172dabcc4a..f51753725a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,521 @@ +2011-12-12 Corinna Vinschen + + * mount.cc (fs_info::update): Set has_buggy_reopen for Netapps as well. + +2011-12-12 Corinna Vinschen + Christopher Faylor + + * 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. + +2011-12-11 Christopher Faylor + + * 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. + +2011-12-10 Christopher Faylor + + * 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. + +2011-12-10 Christopher Faylor + + * sigproc.h (cygwait): Delete duplicate va_start and add matching + va_end. + +2011-12-10 Christopher Faylor + + * sigproc.h (cygwait): Tweak test for cancellable event to make it a + little more clear. + +2011-12-09 Christopher Faylor + + * 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. + +2011-12-09 Christopher Faylor + + * dllfixdbg: Work around annoying gdb warning about missing + .gnu_debuglink. + +2011-12-09 Christopher Faylor + + Rename 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. + +2011-12-09 Christopher Faylor + + * sigproc.cc (signal_exit): Revert reversion of 2011-12-04 change + since, otherwise, you see hangs when the signal pipe is closed. + +2011-12-08 Christopher Faylor + + * select.cc (cygwin_select): Fifth time is the charm. + +2011-12-08 Christopher Faylor + + * select.cc (cygwin_select): Make sure that 0 is returned when sel.wait + times out. + +2011-12-08 Christopher Faylor + + * include/sys/wait.h: Add in all c++ functions. + +2011-12-08 Christopher Faylor + + * select.cc (select_stuff::wait): Temporarily disallow APCS. + +2011-12-08 Christopher Faylor + + * include/sys/wait.h: Ensure that C++ functions are only used when + using C++. + +2011-12-08 Christopher Faylor + + * select.cc (cygwin_select): Make sure that poll is called when + appropriate. + +2011-12-08 Christopher Faylor + + * 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. + +2011-12-07 Christopher Faylor + + * fhandler_termios.cc (tty_min::kill_pgrp): Don't send __SIGSETPGRP + to ourselves since presumably we are already initialized. + +2011-12-07 Christopher Faylor + + * select.cc (cygwin_select): Add common introducer and leaver debug + output. + (select_stuff::poll): Remove unneeded debugging. + +2011-12-07 Christopher Faylor + + * exceptions.cc (ctrl_c_handler): Remove _my_tls.remove since it can + cause deadlocks during exec and will eventually be handled anyway. + +2011-12-07 Corinna Vinschen + + * spawn.cc (child_info_spawn::worker): Add CREATE_BREAKAWAY_FROM_JOB + to all spawned processes. Explain why. + +2011-12-06 Christopher Faylor + + * fhandler_fifo.cc (fhandler_fifo::wait): Fix stupid typo and actually + wait for the handle. + +2011-12-05 Christopher Faylor + + * 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(). + +2011-12-05 Corinna Vinschen + + * 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. + +2011-12-04 Christopher Faylor + + * sigproc.h (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. + +2011-12-04 Christopher Faylor + + * sigproc.h (cygWFMO): Move inside "INSIDE_CYGWIN" #ifdef. + +2011-12-04 Christopher Faylor + + * exceptions.cc (exception::handle): Drop abbreviation for "exception" + since I never remember what it stands for. + (sig_handle_tty_stop): Remove obsolete call to reset_signal_arrived. + (_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. + +2011-12-03 Christopher Faylor + + * 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. + +2011-12-03 Corinna Vinschen + + * 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. + +2011-12-03 Christopher Faylor + + Throughout, 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. + +2011-12-03 Corinna Vinschen + + * fhandler.cc (fhandler_base::open): Fix comment a bit more. + +2011-12-03 Corinna Vinschen + + * fhandler.cc (fhandler_base::open): Fix typos in comment. + +2011-12-02 Corinna Vinschen + + * 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. + +2011-11-29 Christopher Faylor + + * sigproc.cc (get_proc_lock): Remove extra NULL check. Return false on + failure. + +2011-11-29 Christopher Faylor + + * sync.cc: Fix comment. + +2011-11-29 Christopher Faylor + + * dll_init.cc (dll_list::reserve_space): Use %p rather than %lx to show + reserved space. + +2011-11-29 Christopher Faylor + + * sigproc.cc (remove_proc): Don't terminate the currently executing + thread. + +2011-11-28 Christopher Faylor + + * cygheap.cc (cygheap_fixup_in_child): Accommodate new HEAP_3* + classifications for cleanup-after-fork. + * cygheap_malloc.h (cygheap_types): Add HEAP_2_MAX, HEAP_3_FHANDLER. + * fhandler.h: Throughout, change clone to take a cmalloc id. + (fhandler_base::delete): Inline. + (fhandler_base_overlapped): Mark flush_async_io as a friend. + (fhandler_base_overlapped::asio_done): Declare new static member. + (fhandler_base_overlapped::asio_close_counter): Ditto. + (fhandler_base_overlapped::check_later): Declare new function. + (fhandler_base_overlapped::flush_all_async_io): Ditto. + * fhandler.cc (fhandler_base_overlapped::asio_done): Declare. + (fhandler_base_overlapped::asio_close_counter): Ditto. + (flush_async_io): Declare new thread function. + (fhandler_base_overlapped::flush_all_async_io): Declare new function. + (fhandler_base_overlapped::check_later): Ditto. + (fhandler_base_overlapped::close): Call check_later to close + nonblocking fd asynchronously. Assume that this completed + successfully. + * select.cc (pipe_data_available): Don't consider data to be + "available" if fd still has unflushed I/O. + * syscalls.cc (close_all_files): Call + fhandler_base_overlapped::flush_all_async_io to make sure that all + nonblocking pipe I/O has completed. + +2011-11-28 Corinna Vinschen + + * external.cc (fillout_pinfo): Store program name as POSIX path in + ep.progname_long. + +2011-11-28 Corinna Vinschen + + * pinfo.cc (pinfo::exit): Call TerminateProcess to avoid potential + busy loop in ntdll.dll when calling ExitProcess. Only call ExitProcess + as a fallback. + +2011-11-27 Christopher Faylor + + * init.cc (dll_entry): Revert previous change since it caused + inexplicable fork problems. + +2011-11-26 Christopher Faylor + + * init.cc (dll_entry): Don't bother calling through thread removal + cleanup if we are exiting. + +2011-11-26 Christopher Faylor + + * 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. + +2011-11-25 Christopher Faylor + + * 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. + +2011-11-24 Christopher Faylor + + * cygthread.cc (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. + +2011-11-23 Christopher Faylor + + * 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. + +2011-11-23 Christopher Faylor + + * 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. + +2011-11-23 Christopher Faylor + + * 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 fhandler_pipe::create to create the + signal pipe to get a more appropriate message based pipe. + +2011-11-21 Christopher Faylor + + * sigproc.cc (remove_proc): Don't do busy loop when exiting since it + doesn't matter. + +2011-11-21 Christopher Faylor + + * sigproc.cc (remove_proc): Don't do busy loop when execing since + thread could have been terminated prior to setting flag. + + * signal.cc (sigwaitinfo): Zero event before closing to signal other + threads that it is no longer available. + +2011-11-18 Corinna Vinschen + + * shared.cc (get_shared_parent_dir): Use global shared_parent_dir + instead of local dir variable and create handle not inheritable to + avoid accumulating stray handles in child processes. + (get_session_parent_dir): Ditto with session_parent_dir variable. + +2011-11-17 Corinna Vinschen + + * shared.cc (shared_info::create): Open global shared data section + non-inheritable to avoid accumulating stray handles in child processes. + +2011-11-15 Christopher Faylor + + * child_info.h (CURR_CHILD_INFO_MAGIC): Reset. + (cygheap_exec_info::nchildren): Move from child_info_spawn. + (cygheap_exec_info::cchildren): Ditto. + (cygheap_exec_info::record_children): Declare new function. + (cygheap_exec_info::reattach_children): Ditto. + (cygheap_exec_info::alloc): Ditto. + (child_info_spawn::nchildren): Move to cygheap_exec_info. + (child_info_spawn::cchildren): Ditto. + * sigproc.cc (cygheap_exec_info::alloc): Define new function. + (child_info_spawn::cleanup): Accommodate move of children info to + cygheap_exec_info. + (cygheap_exec_info::record_children): Define new function. + (cygheap_exec_info::reattach_children): Ditto. + (child_info_spawn::record_children): Use + cygheap_exec_info function to accomplish this task. + (child_info_spawn::reattach_children): Ditto. + * spawn.cc (child_info_spawn::worker): Allocate moreinfo using + cygheap_exec_info::alloc. + + * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Use abort for the + error to avoid a retry. + +2011-11-14 Christopher Faylor + + * pinfo.cc (_pinfo::dup_proc_pipe): Fatalize a warning when debugging. + +2011-11-13 Christopher Faylor + + Remove erroneously checked-in debugging statements. + * cygheap.cc (cygheap_fixup_in_child): Here. + * debug.cc (delete_handle): Here. + * sigproc.cc (child_info_spawn::cleanup): Here. + * spawn.cc (child_info_spawn::worker): Here. + +2011-11-13 Christopher Faylor + + Throughout, change "sig %d" in strace output to "signal %d" for + consistency. + * assert.cc (__assert_func): Output assertion string to strace too. + * fork.cc (frok::parent): Report ASAP on forked pid in debugging output. + * pinfo.cc (pinfo::_pinfo_release): Define new function. + (pinfo::init): Use _pinfo_release() rather than release() to release + shared memory stuff. + (pinfo::wait): Shorten name of process waiting thread for more concise + debugging. + (pinfo::release): Use pinfo_release to release shared memory part of + struct. + * pinfo.h (pinfo::__pinfo_release): Declare. + 2011-11-10 Christopher Faylor Throughout use "have_execed" macro rather than "hExeced" global handle. @@ -3356,7 +3874,7 @@ * pinfo.h (_pinfo::set_ctty): Change third parameter to fhandler_termios *. - * sigproc.cc (handle_sigsuspend): Don't special-case non-main threads. + * exceptions.cc (handle_sigsuspend): Don't special-case non-main threads. 2011-04-15 Yaakov Selkowitz