aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
AgeCommit message (Collapse)AuthorFilesLines
2004-02-21* exceptions.cc (sigpacket::process): Make sure that tls is filled in forChristopher Faylor2-3/+12
SIGSTOP condition. (_cygtls::call_signal_handler): Restore signal mask using saved oldmask rather than current oldmask.
2004-02-21* path.cc (conv_path_list): Return error condition.Christopher Faylor3-45/+119
(copy1): New function. (copyenc): New function. (mount_item::fnmunge): Return error condition. Use new functions to copy strings. (mount_item::build_win32): Ditto. (mount_info::conv_to_win32_path): Return error condition. (cygwin_conv_to_posix_path): Return result of path conversion. (cygwin_conv_to_full_posix_path): Ditto. (return_with_errno): New macro. (cygwin_win32_to_posix_path_list): Use new macro to potentially set errno. (cygwin_posix_to_win32_path_list): Ditto. * path.h (mount_item::fnmunge): Add size argument. (mount_item::build_win32): Ditto.
2004-02-20 * getopt.c: Avoid useless compiler warnings.Corinna Vinschen2-1/+9
2004-02-20 * getopt.c: Replace with latest vanilla(!) OpenBSD version 1.16.Corinna Vinschen2-251/+298
2004-02-18* fork.cc (fork_child): Invert sense of test which defeated correct handling inChristopher Faylor3-16/+17
a fork from a non-main thread. * dcrt0.cc (initial_env): Eliminate parameter and just send DebugBreak when appropriate. (dll_crt0_0): Reflect parameter change to initial_env. (dll_crt0_1): Don't call initial_env.
2004-02-18* gendef (stabilize_sig_stack): New function.Christopher Faylor3-54/+62
(setjmp): Import, add sig stack handling. Store sig stack info. (longjmp): Call stabilize_sig_stack. Restore sig stack info. * config/i386/setjmp.c: Remove.
2004-02-17 * fork.cc (fork_child): Move fixup_shms_after_fork so thatCorinna Vinschen2-4/+9
signal_arrived is initialized when calling it.
2004-02-17* Makefile.in (clean): Clean libserver, too.Christopher Faylor6-8/+21
* fhandler.cc (fhandler_base::~fhandler_base): Remove path_conv cleanup. * syscalls.cc (chroot): Ditto. * path.cc (path_conv::~path_conv): Define new destructor. (conv_path_list_buf_size): Remove explicit path_conv cleanup. * path.h (path_conv::~path_conv): Declare new destructor.
2004-02-17* Makefile.in: Compile flock.o with -fomit-frame-pointer.Christopher Faylor2-0/+5
2004-02-16* Makefile.in: Compile dlfcn.o with -fomit-frame-pointer.Christopher Faylor2-0/+5
2004-02-16* Makefile.in: Compile delqueue.o with -fomit-frame-pointer.Christopher Faylor2-0/+5
2004-02-16 * syscalls.cc (rename): Do not test the MoveFile error codeCorinna Vinschen2-6/+9
where MoveFileEx exists.
2004-02-16correct changelogChristopher Faylor1-2/+2
2004-02-16* cygheap.cc (_csbrk): Report failing condition to stderr rather than strace.Christopher Faylor3-7/+7
2004-02-15* Makefile.in: Compile syscalls.o with -fomit-frame-pointer.Christopher Faylor3-1/+7
* sigproc.cc: Eliminate unused variable.
2004-02-14 * getopt.c: Replace with latest NetBSD version 1.16. Keep CygwinCorinna Vinschen2-47/+49
specific changes as minimal as possible.
2004-02-14* sigproc.cc (proc_subproc): Change warning back to silent debug output.Christopher Faylor2-1/+6
2004-02-14* dcrt0.cc (alloc_stack_hard_way): Revert to previous implementation.Christopher Faylor5-14/+22
(alloc_stack): Ditto. * exceptions.cc (ctrl_c_handler): Add debugging output.
2004-02-13* Makefile.in (clean): Remove sigfe.s.Christopher Faylor12-100/+134
(sigfe.s): Ensure that sigfe.s will be regenerated if it does not exist. * dll_init.cc (dll_dllcrt0): Simplify initializing tests. * exceptions.cc (setup_handler): Detect when stub caller is either spinning or has acquired the lock after being suspended to avoid windows problems with suspending a win32 API call. * cygtls.h (_cygtls::spinning): Declare new element. * gendef: Remove unused _siglist_index and _siglist declaration. (_sigfe): Set spinning element when potentially looping, waiting for lock. (_sigbe): Ditto. (_cygtls::lock): Ditto. (_longjmp): Ditto. * tlsoffsets.h: Regenerate. * pinfo.cc (_pinfo::exit): Set final exit state here. Call sigproc_terminate if invoked with 'norecord'. Clear any residual _cygtls stuff. * winsup.h (exit_states): Define ES_FINAL. * spawn.cc (spawn_guts): Don't call proc_terminate specifically when execing. Let _pinfo::exit handle that case. * sigproc.cc (wait_subproc): Always exit loop early when proc_loop_wait. * init.cc (munge_threadfunc): Eliminate unused argument. (dll_entry): Reflect above change in call to munge_threadfunc.
2004-02-12* gendef (_sigbe): Zero location on pop.Christopher Faylor2-4/+7
(_cygtls::pop): Ditto.
2004-02-12* dcrt0.cc (alloc_stack_hard_way): Eliminate second argument.Christopher Faylor2-3/+7
(alloc_stack): Remove use of 'b' throughout.
2004-02-12Rename _threadinfo to _cygtls, throughout.Christopher Faylor23-209/+287
* cygtls.h (_cygtls::call_signal_handler): Rename from call_signal_handler_now. (_cygtls::push): Make second argument mandatory. (_cygtls::fixup_after_fork): Declare new function. (_cygtls::lock): Ditto. * cygtls.cc (_cygtls::fixup_after_fork): Define new function. * dcrt0.cc (cygwin_finished_initializing): Define as bool. (alloc_stack): Use _tlstop rather than arbitrary variable in probably vain attempt to avoid strange fork problem on CTRL-C. (dll_crt0_0): Remove obsolete winpids::init call. * dll_init.cc (dll_dllcrt0): Detect forkee condition as equivalent to initializing. * winsup.h (cygwin_finished_initializing): Declare as bool. * exceptions.cc (handle_exceptions): Rely on cygwin_finished_initializing to determine how to handle exception during process startup. (_cygtls::call_signal_handler): Rename from call_signal_handler_now. (_cygtls::interrupt_now): Fill in second argument to push. (signal_fixup_after_fork): Eliminate. (setup_handler): Initialize locked to avoid potential inappropriate unlock. Resume thread if it has acquired the stack lock. (ctrl_c_handler): Just exit if ctrl-c is hit before cygiwn has finished initializing. * fork.cc (sync_with_child): Don't call abort since it can cause exit deadlocks. (sync_with_child): Change debugging output slightly. (fork_child): Set cygwin_finished_initializing here. Call _cygtls fork fixup and explicitly call sigproc_init. (fork_parent): Release malloc lock on fork failure. (vfork): Call signal handler via _my_tls. * sigproc.cc (sig_send): Ditto. * syscalls.cc (readv): Ditto. * termios.cc (tcsetattr): Ditto. * wait.cc (wait4): Ditto. * signal.cc (nanosleep): Ditto. (abort): Ditto. (kill_pgrp): Avoid killing self if exiting. * sync.cc (muto::acquire): Remove (temporarily?) ill-advised exiting_thread check. * gendef (_sigfe): Be more agressive in protecting stack pointer from other access by signal thread. (_cygtls::locked): Define new function. (_sigbe): Ditto. (_cygtls::pop): Protect edx. (_cygtls::lock): Use guaranteed method to set eax to 1. (longjmp): Aggressively protect signal stack. * miscfuncs.cc (low_priority_sleep): Reduce "sleep time" for secs == 0. * pinfo.cc (winpids::set): Counterintuitively use malloc's lock to protect simultaneous access to the pids list since there are pathological conditions which can cause malloc to call winpid. (winpids::init): Eliminate. * pinfo.h (winpids::cs): Eliminate declaration. * pinfo.h (winpids::init): Eliminate definition.
2004-02-11 * security.cc (get_nt_object_attribute): Fix error handling.Corinna Vinschen2-33/+29
2004-02-09 * fhandler_socket.cc (fhandler_socket::ioctl): Add FIONREAD handling.Corinna Vinschen2-0/+9
2004-02-09* debug.h (console_printf): Define for non-debugging condition.Christopher Faylor67-95/+116
* cygtls.h (_threadinfo::lock): Remove wait argument. (_threadinfo::interrupt_setup): Remove retaddr argument. * exceptions.cc (_threadinfo::interrupt_setup): Ditto. (_threadinfo::interrupt_now): Accommodate change to interrupt_setup argument. (setup_handler): Ditto. Always lock sig stack prior to determining interrupt method. * gendef (_sigfe): Correct thinko regarding cmpxchg. (_sigbe): Ditto. (_threadinfo::lock): Ditto. (_threadinfo::pop): Eliminate left-over stack unlock. * sigproc.cc (proc_subproc): Chnage debugging output to printed warning.
2004-02-08* localtime.cc (localtime_r): Call tzset.Christopher Faylor11-100/+214
* Makefile.in: Make version.h/cygwin.din version check a warning since it is not foolproof. * cygheap.h (CYGHEAPSIZE): Bump size down. * cygtls.h (_threadinfo::stacklock): New element. (_threadinfo::pop): Make regparm. (_threadinfo::lock): New function. (_threadinfo::unlock): New function. * cygtls.cc (_threadinfo::push): Wait for a lock on the stack before performing the operation. (_threadinfo::pop): Move to another file. * cygwin.din: More SIGFE changes. * exceptions.cc (try_to_debug): Always display messages on console. (handle_exceptions): Unwind stack only when actually about to call sig_send. (setup_handler): Lock stack prior to performing any operations. * gendef (_sigfe): Ditto. (_sigbe): Ditto. (_threadinfo::pop): Ditto. Move here. * gen_tlsoffsets: Generate positive offsets. * tlsoffsets.h: Regenerate.
2004-02-06 * cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.Corinna Vinschen3-1/+9
* cygserver_ipc.h (struct proc): Add signal_arrived member. (ipc_set_proc_info): Inititalize blk.signal_arrived.
2004-02-06 * uinfo.cc (cygheap_user::init): Use sec_user_nih to build aCorinna Vinschen4-43/+30
security descriptor. Set both the process and the default DACLs. * fork.cc (fork_parent): Use sec_none_nih security attributes. * spawn.cc (spawn_guts): Ditto.
2004-02-05* cygwin.din: Make many more functions SIGFE.Christopher Faylor3-69/+76
* include/cygwin/version.h (CYGWIN_VERSION_SHARED_DATA): Bump.
2004-02-05 * security.h (SID): New macro.Corinna Vinschen5-48/+62
(well_known_*_sid): Change type to cygpsid. (cygsid::init): Delete declaration. * sec_helper.cc (well_known_*_sid): Define using above SID macro. (cygsid::init): Delete. * dcrt0.cc (dll_crt0_0): Do not call cygsid::init. * security.cc (get_user_local_groups): Change the second argument type to cygpsid.
2004-02-04update copyrightChristopher Faylor1-1/+1
2004-02-03* tlsoffsets.h: Regenerate.Christopher Faylor1-1/+2
2004-02-03* cygtls.h (_local_storage::signamebuf): Increase size to prevent overflow onChristopher Faylor3-34/+39
really odd values.
2004-02-03* Makefile.in (DLL_OFILES): Add strsig.o.Christopher Faylor8-44/+151
* cygtls.h (_local_storage::signamebuf) New element. * sysconf.cc (sysconf): Implement _SC_RTSIG_MAX. * tlsoffset.h: Regenerate. * include/limits.h (_POSIX_RTSIG_MAX): New define. (RTSIG_MAX): Ditto. * include/cygwin/signal.h (SIGRTMIN): New define. (SIGRTMAX): Ditto. (NSIG): Bump. * strsig.cc: New file.
2004-02-03* window.cc (Winmain): Show windows error code in error output whenChristopher Faylor2-1/+6
RegisterClass fails.
2004-02-02* fhandler.h (*::fixup_after_exec): Eliminate unused handle argument.Christopher Faylor14-35/+48
* fhandler.h (dtable::fixup_after_exec): Eliminate unused handle argument. * dcrt0.cc (dll_crt0_1): Reflect elimination of unused handle argument to fixup_after_exec. * dtable.cc (dtable::fixup_after_exec): Ditto. * fhandler_console.cc (fhandler_console::fixup_after_exec): Ditto. * fhandler_dsp.cc (fhandler_dsp::fixup_after_exec): Ditto. * fhandler_raw.cc (fhandler_raw::fixup_after_exec): Ditto. * fhandler_socket.cc (fhandler_socket::fixup_after_exec): Ditto. * fhandler_virtual.cc (fhandler_virtual::fixup_after_exec): Ditto. * pipe.cc (fhandler_pipe::fixup_after_exec): Ditto. * spawn.cc (spawn_guts): Do not set ciresrv.parent. * child_info.h (child_info_spawn::~child_info_spawn): Do not close parent. Update CURR_CHILD_INFO_MAGIC. * dcrt0.cc (dll_crt0_0): Do not close spawn_info->parent. Pass NULL to cygheap->fdtab.fixup_after_exec().
2004-02-02Throughout, change name from set_inheritance to set_no_inheritance to betterChristopher Faylor9-20/+28
reflect input arguments of this function. * cygheap.h (CYGHEAPSIZE): Increase size of cygheap to something closer to the 21st century.
2004-02-02 * cygerrno.h (set_errno): Replace semicolon with comma in non-DEBUGGINGCorinna Vinschen2-1/+6
version to avoid compile time error.
2004-02-01* cygerrno.h (set_errno): Set global errno whenever setting thread specificChristopher Faylor7-22/+54
version. * debug.cc (__set_errno): Ditto. * exceptions.cc (handle_sigsuspend): Remove spurious sig_dispatch_pending call. (set_signal_mask): When there seem to be pending signals to dispatch, tell signal_dispatch_pending/sig_send not to specifically call any handlers. * sigproc.h (sig_dispatch_pending): Change declaration to void. * sigproc.cc (sig_dispatch_pending): Change definition to void. Take an argument to determine whether to tell sig_send to wait for handler to be called. * sigproc.cc (sig_send): Don't call signal handler when sig == __SIGFLUSHFAST. (wait_sig): Honor __SIGFLUSHFAST. Guard against sigpacket::process nuking si_signo. * sigproc.h (__SIGFLUSHFAST): Define new special signal. (sig_dispatch_pending): Change declaration to void. Take optional boolean argument. * fork.cc (vfork): Add debugging output.
2004-01-26* exceptions.cc (sig_handle_tty_stop): Avoid races by waiting for bothChristopher Faylor3-9/+34
signal_arrived and for sigCONT. (sigpacket::process): Enforce sending of both signal_arrived and sigCONT, where appropriate. * gendef (sigreturn): Save tls pointer in ebx so that it can jump into sigdelayed and use the same register.
2004-01-26* cygtls.cc (_threadinfo::init_thread): Add more local reent stdioChristopher Faylor5-19/+46
initialization. * dcrt0.cc (initial_env): Can it really be true that XP doesn't allow attaching a debugger during DLL attach? Add temporary workaround. (dll_crt0_0): Ensure that _impure_ptr stdio is initialized before any threads. (dll_crt0_1): Move _impure_ptr initialization to dll_crt0_0. * exceptions.cc (try_to_debug): Reinstate old method for looping while debugging. * syscalls.cc (_cygwin_istext_for_stdio): Regularize debugging output. Remove hopefully extraneous check. (setmode_helper): Add debugging output for improbable case. Use "binary" rather "raw" for consistency.
2004-01-25* fhandler.cc (fhandler_base::fhaccess): Avoid always setting errno to EACCESSChristopher Faylor2-14/+22
when return value is < 0. Rely on errno being set properly.
2004-01-25* sigproc.cc (proc_subproc): Don't protect *child's* handle.Christopher Faylor2-1/+4
2004-01-24* fhandler.h (fhandler_base::fhaccess): Return int for compatibility withChristopher Faylor3-12/+23
access. * fhandler.cc (fhandler_base::fhaccess): Return int. Use consistent variable name for exit value. Exit at bottom, printing debugging information, like other cygwin functions.
2004-01-24* cygheap.cc (init_cygheap::close_ctty): Protect YA vforkism.Christopher Faylor10-110/+133
* fhandler.h (fhandler_base::has_acls): Make pass through for path_conv method. (fhandler_base::isremote): Ditto. (fhandler_base::is_fs_special): Ditto. (fhandler_base::has_attribute): Ditto. Define new function. (fhandler_base::fhaccess): Declare new function based on access_worker. (fhandler_base::set_has_acls): Eliminate obsolete function. (fhandler_base::set_isremote): Ditto. * fhandler.cc (fhandler_base::fhaccess): Move from syscalls.cc and into fhandler_base class. Use fhandler methods to access data rather than path_conv stuff. (fhandler_base::device_access_denied): Use fhaccess method. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto. (fhandler_base::open_fs): Remove calls to obsolete functions. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * winsup.h (access_worker): Remove obsolete access_worker declaration. *syscalls.cc (access_worker): Move function to fhandler.cc. (access): Use fhaccess method. * pinfo.cc (_pinfo::set_ctty): Clarify debugging output. * sigproc.cc (sig_dispatch_pending): Ditto. * syscalls.cc (setsid): Perform minor rearrangement.
2004-01-242004-01-23 Pierre Humblet <pierre.humblet@ieee.org>Pierre Humblet2-15/+22
* fhandler_socket.cc (fhandler_socket::create_secret_event): Avoid creating multiple handles. Always allow event inheritance but set the handle inheritance appropriately. Improve error handling. (fhandler_socket::check_peer_secret_event): Improve error handling. (fhandler_socket::close_secret_event): Simply call CloseHandle. (fhandler_socket::set_close_on_exec): Set secret event inheritance.
2004-01-23* configure.in: Remove NEWVFORK default.Christopher Faylor22-27/+150
* configure: Regenerate. * dcrt0.cc: Conditionalize vfork stuff throughout. * dtable.cc: Ditto. * perthread.h: Ditto. * pipe.cc (fhandler_pipe::close): Ditto. * spawn.cc (spawnve): Ditto. * syscalls.cc (setsid): Ditto. * exceptions.cc (sigpacket::process): Use macro to refer to vfork pid. * debug.cc (verify_handle): Define new function. * debug.h (VerifyHandle): Define new macro. (verify_handle): Declare new function * fhandler.cc (fhandler_base::dup): Verify that dup'ed handle is not supposed to be in use. (fhandler_base::set_inheritance): Ditto. (fhandler_base::fork_fixup): Ditto. * fhandler_socket.cc (fhandler_socket::dup): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. * net.cc (set_socket_inheritance): Ditto. * pinfo.cc (pinfo_fixup_after_exec): Ditto. * sigproc.cc (proc_subproc): Ditto. (sig_send): Ditto. * spawn.cc (spawn_guts): Ditto. * thread.cc (pthread::init_mainthread): Ditto. * pipe.cc (fhandler_pipe::close): Close read_state with ForceCloseHandle since it was protected. (fhandler_pipe::fixup_after_exec): Protect read_state handle. (fhandler_pipe::dup): Correctly close open handles on error condition. Verify that dup'ed handle is not supposed to be in use. (fhandler_pipe::create): Protect read_state.
2004-01-23* exceptions.cc (sig_handle_tty_stop): Fix boneheaded mistake by using correctChristopher Faylor2-1/+7
check for parent state rather than inverted check mistakenly introduced on 2003-09-15.
2004-01-23* fhandler_serial.cc (fhandler_serial::raw_write): Prevent a deadlock when theChristopher Faylor2-4/+16
input buffer overflows. (fhandler_serial::raw_read): Correct to print the actual error and only call PurgeComm when necessary.
2004-01-22change comment.Christopher Faylor1-2/+2