summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* fix typoChristopher Faylor2013-01-141-1/+1
|
* * include/pthread.h (pthread_exit): Mark as "noreturn".Christopher Faylor2013-01-142-1/+5
|
* fix typoChristopher Faylor2013-01-141-1/+1
|
* Fix copyrightsCorinna Vinschen2013-01-144-5/+5
|
* update with my changesChristopher Faylor2013-01-141-0/+21
|
* *** empty log message ***Corinna Vinschen2013-01-141-0/+27
|
* * exceptions.cc (signal_exit): Move captive process termintation...Christopher Faylor2013-01-147-38/+31
| | | | | | | | | | | | | | | | (_cygtls::interrupt_setup): ...into here. (sigpacket::process): Simplify setting of handler when have_execed. (_cygtls::interrupt_setup): Don't call proc_subproc when we've execed. * globals.cc (exit_states): Delete unneeded ES_EXEC_EXIT. * pinfo.cc (pinfo::exit): Change debugging output. Call proc_terminate rather than the now-obsolete sigproc_terminate. Don't set exit_state to ES_EXEC_EXIT. Set exit_state to ES_FINAL later. * sigproc.cc (sigproc_terminate): Delete function. (wait_sig): Don't call proc_subproc if have_execed. * sigproc.h (sigproc_terminate): Delete declaration. * sync.h (lock_process::lock_process): Don't set exit_state to ES_PROCESS_LOCKED. (lock_process::operator LONG): Define.
* * new-features.sgml (ov-new1.7.18): Add console enhancements.Corinna Vinschen2013-01-122-0/+23
|
* * DevNotes: Add entry cgf-000021.Christopher Faylor2013-01-114-16/+29
| | | | | * select.cc (select): Unconditionally return when a signal is detected. (select_stuff::wait): Ditto.
* * syscalls.cc (rename): Drop handling paths > 32757 chars, emit EINVALCorinna Vinschen2013-01-112-22/+28
| | | | | | instead, thus simplifying code allocating and filling pfri. Drop size and use constant expression in NtSetInformationFile call. Add comments. Drop redundant test for fs_serial_number and change comment accordingly.
* * fhandler.h (class dev_console): Flag for expanded control sequence.Corinna Vinschen2013-01-113-3/+52
| | | | * fhandler_console.cc (char_command): Supporting cursor style modes.
* * path.h (path_conv::fs_type): New method.Corinna Vinschen2013-01-103-8/+74
| | | | | | * syscalls.cc (rename): Check for cross-device situation before touching anything. Explain why. Workaround NFS bug in call to NtSetInformationFile(FileRenameInformation).
* * cygerrno.h: Fix copyright.Corinna Vinschen2013-01-093-3/+6
| | | | * exceptions.cc: Drop comment explaining removed variable.
* * dcrt0.cc (main_thread_sinit): New inline function. Fix and explainCorinna Vinschen2013-01-092-2/+31
| | | | | a stdio initialization issue. (dll_crt0_1): Call main_thread_sinit rather than __sinit.
* * thread.cc (pthread_rwlock::lookup_reader): Remove parameter: always assumeChristopher Faylor2013-01-073-20/+29
| | | | | | | | | | | that we're looking for the current thread. (pthread_rwlock::tryrdlock): Eliminate self variable. Accommodate change in lookup_reader(). (pthread_rwlock::unlock): Ditto. (pthread_rwlock::rdlock): Ditto. Move add_reader call after writer tests to more closely mimic old behavior. (pthread_rwlock::wrlock): Accommodate change in lookup_reader(). * thread.h ((pthread_rwlock::lookup_reader): Eliminate argument.
* * thread.cc (pthread_rwlock::add_reader): Perform new operation here and returnChristopher Faylor2013-01-073-19/+27
| | | | | | | | pointer to allocated RWLOCK_READER structure. (pthread_rwlock::rdlock): Reorganize to reflect new add_reader functionality. (pthread_rwlock::tryrdlock): Ditto. Remove unneeded call to lookup_reader(). * thread.h (pthread_rwlock::RWLOCK_READER::RWLOCK_READER): New constructor. (pthread_rwlock::add_reader): Reflect new functionality.
* * globals.cc (exit_states): Renumber so that ES_EXIT_STARTING is first, asChristopher Faylor2013-01-043-2/+9
| | | | | | intended. * sigproc.cc (wait_sig): Only stop accepting signals after exit_state > ES_EXIT_STARTING.
* * sigproc.cc (exit_thread): Set thread signal mask so that no signals are sentChristopher Faylor2013-01-032-1/+7
| | | | to an exiting thread.
* * sigproc.cc (no_signals_available): Remove exit_state test since signals areChristopher Faylor2013-01-032-16/+24
| | | | | | | | available in a limited fashion when exiting. (sig_dispatch_pending): Ditto. (sig_send): Ditto. (exit_thread): Rearrange to avoid an unnecessary DuplicateProcess when exiting. (wait_sig): Allow special signals when exiting.
* update copyrightChristopher Faylor2013-01-021-1/+1
|
* * DevNotes: Add entry cgf-000020, relating to previous checkin.Christopher Faylor2013-01-022-1/+34
|
* * 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.
* * pathnames.sgml (pathnames-at): Drop confusing description onCorinna Vinschen2012-12-202-1/+5
| | | | "embedded double quotes".
* * 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.
* * utils.sgml (mount): Document sparse mount option.Corinna Vinschen2012-12-142-0/+6
|
* * new-features.sgml (ov-new1.7.18): Add sparse change.Corinna Vinschen2012-12-143-0/+14
| | | | * pathnames.sgml (mount-table): Document sparse mount option.
* *** 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.
* * new-features.sgml (ov-new1.7.18): New section. Document cfsetspeed.Yaakov Selkowitz2012-12-062-0/+16
|
* * include/cygwin/wait.h (WAIT_ANY): Define.Yaakov Selkowitz2012-12-062-0/+8
| | | | (WAIT_MYPGRP): Define.