summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * cygtls.h (_cygtls::signal_exit): Delete from class.Christopher Faylor2013-01-028-3280/+3262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exception.h (cygwin_exception): New class. (cygwin_exception::dumpstack): Declare new function. (cygwin_exception::context): Ditto. (cygwin_exception::dump_exception): Ditto. * exceptions.cc (cygwin_exception::dump_exception): Move into cygwin_exception class. Accommodate new variable names. (cygwin_exception::dumpstack): Ditto stackdump -> dumpstack. (exception::handle): Move andreas processing earlier. Defer signal processing decisions to the signal thread where they belong. Pass exception information to sig_send via new siginfo_t si_cyg field. (ctrl_c_handler): Wait for SIGHUP signal to be processed since it could cause a process exit and we don't want races with thread exit lock. (signal_exit): Move back here from sigproc.cc. Modify arguments and remove from sigpacket class. Decide when to dump core based on signal type. (sigpacket::process): Handle exiting signals in context of threads rather than in the signal thread. Signal debugger on non-Windows signals. Remove setup_signal_exit call. * sigproc.cc (no_signals_available): Remove argument. (signal_exit_code): Delete. (close_my_readsig): Ditto. (_cygtls::signal_exit): Move to exceptions.cc. (sigproc_terminate): Don't attempt to terminate signal thread. (setup_signal_exit): Delete. (exit_thread): Use new si_cyg entry in siginfo_t. (sig_send): Just use empty initializer for si. Accommodate change in no_signals_available argument. (wait_sig): Remove attempt to "go asynchronous" on process exit. Delete __SIGEXIT handling. Don't ever exit. * sigproc.h: Remove __SIGEXIT from signal enum. Renumber. * include/cygwin/signal.h (siginfo_t): Add si_cyg entry.
* * sigproc.cc (wait_sig): Remove spurious extern.Christopher Faylor2012-12-312-1/+4
|
* * dtable.cc (dtable::dup3): Fix bounds checking for valid newfd.Christopher Faylor2012-12-314-3/+8
| | | | | * syscalls.cc (dup2): Ditto. * winsup.h (events_terminate): Delete obsolete function declaration.
* * DevNotes: Add entry cgf-000019.Christopher Faylor2012-12-288-43/+117
| | | | | | | | | | | | | | | | | | | | | * dcrt0.cc (do_exit): Just set exit_state to ES_EVENTS_TERMINATE and nuke call to events_terminate which just set a superfluous flag. * sigproc.cc (signal_exit_code): New variable. (setup_signal_exit): Define new function. (_cygtls::signal_exit): Remove accommodations for closing the signal pipe handle. (exit_thread): Just sleep if we're exiting. (wait_sig): If signal_exit_code is set, just handle bookkeeping signals and exit ReadFile loop if there is nothing more to process. Call signal_exit at end if signal_exit_code is non-zero. * sigproc.h (setup_signal_exit): Declare new function. * exceptions.cc (sigpacket::process): Use setup_signal_exit to control exiting due to a signal. (exception::handle): Ditto. Query exit_state rather than defunct exit_already to determine if we are exiting. * globals.cc (ES_SIGNAL_EXIT): New enum. * sync.h (lock_process::release): New function for explicitly unlocking muto. (lock_process::~lock_process): Use release method.
* * fork.cc (child_info::prefork): Fix error message formatting.Christopher Faylor2012-12-272-1/+5
|
* Fix tid comment.Christopher Faylor2012-12-221-2/+2
|
* * select.h (select_stuff): Remove variable names from parameter declarations.Christopher Faylor2012-12-224-11/+55
| | | | | | | | | | | | | | | | (select_info): Ditto. (select_record::dump_select_record): Declare new debugging-only function. (select_info): Zero all fields. (select_pipe_info): Ditto. (select_socket_info): Ditto. (select_serial_info): Ditto. (select_mailslot_info): Ditto. * select.cc (select_record::dump_select_record): Define new debugging-only function. (select_stuff::test_and_set): Call dump_select_record when debugging. * thread.cc (pthread_mutex::unlock): Revert setting of tid to NULL since, in this context, it is a number, not a pointer. (pthread_spinlock::unlock): Ditto.
* Back out prematurely checked-in change.Christopher Faylor2012-12-221-2/+2
|
* * sigproc.cc (exit_thread): undef ExitThread or suffer recursion. Attempt toChristopher Faylor2012-12-223-4/+11
| | | | lock process prior to calling sig_send.
* Revert the reversion and go with implementation described in cgf-000017, withChristopher Faylor2012-12-2113-23/+93
| | | | | | | | | | | | | | | | | | | | | | some modifications. * init.cc (dll_entry): Revert previous change. * miscfuncs.cc: Include sigproc.h for exit_thread declaration. * winsup.h (ExitThread): Define as 'exit_thread' to ensure no accidental use. * sigproc.cc (exit_thread): New function. (wait_sig): Handle __SIGTHREADEXIT case. Don't just block rather than returning from this function. * sigproc.h (__SIGTHREADEXIT): New enum. (exit_thread): Declare. * sync.cc (muto::release): Accept a tls command-line argument. * sync.h (muto::release): Accept a tls command-line parameter. Default to &_my_tls. * cygerrno.h (__set_errno): Define as extern so that no function code is ever emitted. * cygserver_ipc.h (cygserver_ipc.h): Ditto. * miscfuncs.h (transform_chars): Ditto. * path.h (has_attribute): Ditto. * security.h (privilege_luid): Ditto. * winsup.h (flush_file_buffers): Ditto.
* * DevNotes: Add entry cgf-000018.Christopher Faylor2012-12-2110-61/+45
| | | | | | | | | | | | | | * init.cc (dll_entry): Grab process lock before exiting to ensure that thread doesn't exit before parent if parent is exiting. * _cygtls.cc (_cygtls::call2): Revert previous 2012-12-21 change. * miscfuncs.cc (thread_wrapper): Ditto. * thread.cc (pthread::exit): Ditto. * sigproc.cc (exit_thread): Ditto. (wait_sig): Ditto. * sync.cc (muto::release): Ditto. * sync.h (muto::release): Ditto. * sigproc.h (__SIGTHREADEXIT): Delete enum. (exit_thread): Delete declaration.
* * DevNotes: Add entry cgf-000017.Christopher Faylor2012-12-2110-13/+106
| | | | | | | | | | | | | | | | | | * _cygtls.cc (_cygtls::call2): Use new exit_thread function in place of ExitThread. * miscfuncs.cc (thread_wrapper): Ditto. * thread.cc (pthread::exit): Ditto. (pthread_mutex::unlock): Set tid to NULL rather than 0. (pthread_spinlock::unlock): Ditto. * pinfo.cc (commune_process): Actually call lock_process constructor. * sigproc.cc (exit_thread): New function. (wait_sig): Handle __SIGTHREADEXIT case. Don't just block rather than returning from this function. * sigproc.h (__SIGTHREADEXIT): New enum. (exit_thread): Declare. * sync.cc (muto::release): Accept a tls command-line argument. * sync.h (muto::release): Accept a tls command-line parameter. Default to &_my_tls.
* * dcrt0.cc (build_argv): Allow quoted filenames in @ expression.Corinna Vinschen2012-12-202-1/+9
|
* Add missing file.Christopher Faylor2012-12-191-2/+2
|
* * select.h (select_stuff::select_stuff): Make default constructor always zeroChristopher Faylor2012-12-192-1/+8
| | | | | everything while constructor with int arg just zeroes next. * select.cc (select_stuff::test_and_set): Revert to using default constructor.
* * select.cc (select_stuff::wait): Add windows error number to error message.Christopher Faylor2012-12-192-1/+5
|
* * select.cc (select_stuff::test_and_set): Remove workaround and use properChristopher Faylor2012-12-182-1/+6
| | | | constructor.
* * select.cc (select_stuff::test_and_set): Work around problem of new() notChristopher Faylor2012-12-182-1/+6
| | | | returning zeroed memory.
* *** empty log message ***Corinna Vinschen2012-12-141-0/+10
|
* * fhandler.cc (fhandler_base::write): Don't attempt to sparsifyCorinna Vinschen2012-12-146-12/+48
| | | | | | | | | | | | | | | | | an already sparse file. Drop check for FILE_SUPPORTS_SPARSE_FILES flag. Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes. (fhandler_base::lseek): Only set did_lseek if sparseness is supported. * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Don't attempt to sparsify an already sparse file. Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes. * mount.cc (oopt): Add "sparse" flag. (fillout_mntent): Ditto. * path.h (enum path_types): Add PATH_SPARSE. (path_conv::support_sparse): New method. (path_conv::fs_flags): Constify. (path_conv::fs_name_len): Ditto. include/sys/mount.h: Replace unused MOUNT_MIXED flag with MOUNT_SPARSE.
* * sigproc.h (sig_send): Accept tid as argument #3. Default to NULL.Christopher Faylor2012-12-103-4/+10
| | | | | * sigproc.cc (sig_send): Ditto. Pass tid to other sig_send. (sigpending): Send current thread as arg #3.
* * exceptions.cc (sigpacket::process): Reorganize to avoid use of tls beforeChristopher Faylor2012-12-073-13/+25
| | | | | | initialization. * fhandler_fifo.cc (fhandler_fifo::arm): Avoid improper printing of integer as a string in debug output.
* * sigproc.h (sigpacket): Remove parameter names from declarations.Christopher Faylor2012-12-074-10/+24
| | | | | | | | | (sigpacket::sigtls): Rename from 'tls'. * exceptions.cc (sigpacket::process): Define local tls variable and assign that to sigtls if appropriate. Clarify debugging output. * sigproc.cc (sig_send): Accommodate tls -> sigtls rename. (pending_signals::add): Ditto. (wait_sig): Ditto.
* * cygtls.h (_cygtls::get_signal_arrived): Add parameter to make lock/unlockChristopher Faylor2012-12-074-4/+16
| | | | | | | conditional. * exceptions.cc (_cygtls::interrupt_setup): Don't get a lock when setting signal_arrived since we already have one. * gendef: Add some comments to make it easier to find functions.
* * include/cygwin/wait.h (WAIT_ANY): Define.Yaakov Selkowitz2012-12-062-0/+8
| | | | (WAIT_MYPGRP): Define.
* * child_info.h (class child_info_spawn): Drop unused member lock.Corinna Vinschen2012-12-053-3/+7
| | | | | (CURR_CHILD_INFO_MAGIC): Update. * sigproc.cc (child_info_spawn::child_info_spawn): Drop setting lock.
* * cygtls.h (_cygtls::will_wait_for_signal): Rename from 'signal_waiting' toChristopher Faylor2012-12-044-23/+31
| | | | | | | | | something more expressive. Reflect rename throughout. (_cygtls::get_signal_arrived): Rename from create_signal_arrived. Move lock here. (_cygtls::set_signal_arrived): Use get_signal_arrived. * exceptions.cc (_cygtls::interrupt_setup): Use get_signal_arrived. * tlsoffsets.h: Regenerate.
* revert erroneous checkinChristopher Faylor2012-11-303-122/+114
|
* * spawn.cc (child_info_spawn::worker): Make detection of '/c' case insensitiveChristopher Faylor2012-11-305-115/+128
| | | | when looking for cmd.exe command line.
* ChangeLog:Christopher Faylor2012-11-264-120/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. cygserver/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. cygwin/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. doc/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. lsaauth/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. testsuite/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. utils/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate.
* * fhandler_registry.cc: Drop Mingw.org considerations.Corinna Vinschen2012-11-2610-128/+14
| | | | | | | | | | | * fhandler_serial.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_tape.cc: Ditto. * fhandler_tty.cc: Ditto. * net.cc: Ditto. * ntdll.h: Ditto. * sched.cc: Ditto. * sec_helper.cc: Ditto.
* * configure.in: Remove unneeded ALLOC substitution.Christopher Faylor2012-11-233-5/+6
| | | | | * configure: Regenerate. * aclocal.m4: Ditto.
* * configure.in: Add previously-missed AC_NO_EXECUTABLES.Christopher Faylor2012-11-233-0/+85
| | | | | * configure: Regenerate. * aclocal.m4: Ditto.
* cygwin/ChangeLog:Christopher Faylor2012-11-232-1/+5
| | | | | | | | | | | | | | | | | 2012-11-23 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Use explicit path to mkdir. lsaauth/ChangeLog: 2012-11-23 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Use /bin/mkdir to make directories. testsuite/ChangeLog: 2012-11-23 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Remove old Makefile.common'isms. Don't rely on in-build tools.
* ChangeLog:Christopher Faylor2012-11-2310-1388/+691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.common: Revamp for new configury. Add default compilation targets, include .E processing. Add magic for allowing "CFLAGS" to control optimization options in "CXXFLAGS". * configure.cygwin: New include for Cygwin configure.in's. * acinclude.m4: Delete old definitions. Implement AC_WINDOWS_HEADERS, AC_WINDOWS_LIBS, AC_CYGWIN_INCLUDES, target_builddir, winsup_srcdir. * aclocal.m4: Regenerate. * autogen.sh: New file. * ccwrap: New script. * c++wrap: New script. * config.guess: New script. * config.sub: New script. * configure: Regenerate. * configure.in: Eliminate LIB_AC_PROG_* calls in favor of standard. Delete ancient target test. * install-sh: New script. cygserver/ChangeLog: 2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Revamp for new configury. * configure.in: Revamp for new configury. * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. cygwin/ChangeLog: 2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx> * select.cc (select): Don't return -1 when we've timed out after looping. 2012-11-22 Christopher Faylor <me.cygwin2012@cgf.cx> * Makefile.in: Revamp for new configury. (datarootdir): Add variable setting. (winver_stamp): Accommodate changes to mkvers.sh setting. (libc.a): Fix race when libm.a might not have been built yet. * configure.in: Revamp for new configury. * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. * mkvers.sh: Find include directives via CFLAGS and friends rather than assuming that w32api lives nearby. utils/ChangeLog: 2012-11-12 Christopher Faylor <me.cygwin2012@cgf.cx> * aclocal.m4: Regenerate. * configure: Ditto. * autogen.sh: New script. * configure.in: Revamp for new configury. * Makefile.in: Revamp for new configury. Rename ALL_* to just *. Always use "VERBOSE" setting. (MINGW_CXX): Don't include CFLAGS in definition. (all): Define target first, before everything else so that it is the default. (ps.exe): Don't add useless -lcygwin. (ldh.exe): For consistency, add to existing MINGW_LDFLAGS rather than redefining them. (cygcheck.exe): Always include -lz for MINGW_LDFLAGS. Don't try to figure out where to find it. (dumper.exe): Simplify check. Assume libraries are installed rather than trying to retrieve from source tree. (install): Just use /bin/mkdir to create directories. (Makefile): Regenerate when standard dependencies change. * dump_setup.cc: Always include zlib.h. Remove accommodations for it possibly not existing. * parse_pe.cc: Add define which allows building with installed binutils package. * dumper.cc: Ditto.
* * termios.cc (cfsetspeed): New function.Yaakov Selkowitz2012-11-216-1/+27
| | | | | | | * cygwin.din (cfsetspeed): Export. * posix.sgml (std-bsd): Add cfsetspeed. * include/sys/termios.h (cfsetspeed): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * include/mntent.h: Only include paths.h when building for Cygwin.Corinna Vinschen2012-11-162-3/+14
| | | | Add comment to explain why.
* * winbase.h: Semi-reinstantiate to workaround lack inline assemblerCorinna Vinschen2012-11-113-8/+45
| | | | | | implementation of InterlockedCompareExchange for i686 in Mingw64 headers. * pinfo.cc (pinfo::init): Remove unused variable mapaddr.
* * sigproc.cc (proc_subproc): Delete unused variable child.Corinna Vinschen2012-11-082-1/+4
|
* * fhandler_termios.cc (fhandler_termios::line_edit): Don't do special characterChristopher Faylor2012-11-084-24/+30
| | | | | | handling when stopped by CTRL-S. * fhandler_tty.cc (bytes_available): Add arguments to debug_only_printf call. * sigproc.cc (proc_subproc): Simplify some if logic.
* * include/sys/termios.h (CBRK): Define as alias of CEOL.Yaakov Selkowitz2012-11-052-0/+16
| | | | | | (CREPRINT): Define as alias of CRPRNT. (CDISCARD): Define as alias of CFLUSH. (TTYDEF_*): Define.
* Fix copyrightCorinna Vinschen2012-10-311-1/+1
|
* * include/sys/param.h: Include stddef.h to define NULL.Corinna Vinschen2012-10-312-4/+7
|
* * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Fix usingCorinna Vinschen2012-10-312-1/+6
| | | | wrong value in condition.
* * include/sys/cygwin.h: Add missing defines for CW_ALLOC_DRIVE_MAP,Corinna Vinschen2012-10-302-0/+8
| | | | CW_MAP_DRIVE_MAP and CW_FREE_DRIVE_MAP.
* * dcrt0.cc (quoted): Renamed strechr to strchrnul.Kai Tietz2012-10-277-10/+19
| | | | | | | | * environ.cc (environ_init): Likewise. * sec_acl.cc (aclfromtext32): Likewise. * sec_auth.cc (extract_nt_dom_user): Likewise. * uinfo.cc (pwdgrp::next_str): Likewise. * string.h (strechr): Likewise.
* * string.h (strechr): Replace assembler byKai Tietz2012-10-262-60/+37
| | | | | | C code. (ascii_strcasematch): Likewise. (ascii_strncasematch): Likwise.
* * dir.cc (closedir): Fix syscall_printf.Corinna Vinschen2012-10-262-1/+5
|
* * include/cygwin/signal.h (sigset_t): Define here.Corinna Vinschen2012-10-262-0/+6
|
* * Makefile.in (DLL_IMPORTS): Use system import libraries forYaakov Selkowitz2012-10-242-2/+9
| | | | | | kernel32 and ntdll instead of from in-tree w32api. (cygwin0.dll): Remove rule dependency on DLL_IMPORTS, as they are no longer built in-tree.