* sigproc.h (struct sipacket::thread_handle): Put thread_handle here.
* sigproc.cc (sigproc_terminate): Move setting of thread_handle...
(sig_send): ...to here. Put it in packet being sent. Only close pack.wakeup
when we're waiting for completion.
(wait_sig): Use thread_handle directly from received packet.
* cygtls.h (struct _cygtls::thread_handle): New field.
* dcrt0.cc (exit_lock): Remove declaration.
* winsup.h (exit_lock): Add declaration.
* exceptions.cc (sigpacket::process): Properly return after signal_exit.
* pinfo.cc (pinfo::exit): Only exit the process if _my_tls.thread_handle has
not been filled out -- which should be an impossible event.
* sigproc.cc (sigproc_terminate): Fillout _my_tls.thread_handle to provide
something for wait_sig to wait for. Use the siginfo_t version of sig_send and
fill out the tls argument with _my_tls.
(wait_sig): Wait for the thread specified in pack.tls or (for now) complain
bitterly if it doesn't exit.
file attributes argument.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Use
file attributes evaluated from NtQueryFileInformation or
FileInformationByHandle in call to fstat_helper.
Set pc.fileattr from just evaluated file attributes here.
(fhandler_base::fstat_by_name): Use file attributes evaluated from
FindFileFirst or default attribute in call to fstat_helper.
Set pc.fileattr from just evaluated file attributes here.
(fhandler_base::fstat_helper): Use file attributes given as argument,
not file attributes stored in this fhandler, since this information
is potentially wrong. Add comment to explain this.
* path.h (has_attribute): New global inline function.
(path_conv::set_attributes): New method to change fileattr.
* mkgroup.c (print_win_error): Create macro calling ...
(_print_win_error): ... this function created from former
print_win_error. Move up in source.
(PDOMAIN_CONTROLLER_INFOW): Define return type of DcGetDcNameW.
(dsgetdcname): New function pointer for DcGetDcNameW.
(load_netapi): Get DcGetDcNameW address.
(main): If DcGetDcNameW is available, use it.
* mkpasswd.c (PDOMAIN_CONTROLLER_INFOW): Define return type of
DcGetDcNameW.
(dsgetdcname): New function pointer for DcGetDcNameW.
(load_netapi): Get DcGetDcNameW address.
(main): If DcGetDcNameW is available, use it. Rename local variable
domain_name_specified to domain_specified as in mkgroup.c.
* libc/include/stdint.h (__EXP): Rename to __STDINT_EXP
and do not #undef the macro after it is used. Fix typos.
Also change 64-bit constants to use the __have_long64 and
__have_longlong64 flags to determine if long or long long
constants should be used.
* libc/include/inttypes.h: Include stddef.h to get wchar_t
type defined.
* configure.in (powerpc-*-aix*): Add target-libssp to noconfigdirs.
(rs6000-*-aix*): Same.
* configure: Regenerate.
2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* configure.in: Recognize f95 in the --enable-languages option,
and substitute it for fortran, issuing a warning.
* configure: Regenerate.
pinfo::exit.
* pinfo.cc (pinfo::exit): Move sigproc_terminate later so that signals can be
processed while waiting for hExeced child.
(pinfo::maybe_set_exit_code_from_windows): Set exit code from sigExeced if it
is non-zero. Set exit_state to ES_EXEC_EXIT prior to waiting for captive
process exit code.
* exceptions.cc (sigExeced): New global variable.
(signal_exit): Remove noreturn attribute from declaration.
(signal_exit): Just terminate captive process and return if hExeced on the
theory that the exit will be subsequently handled in the main thread.
* sigproc.cc (sigproc_terminate): Eliminate test for ES_SIGPROCTERMINATE and
use ES_FINAL instead.
(sig_send): Use no_signals_available instead of duplicate test.
* winsup.h (ES_EXEC_EXIT): New enum.
(ES_SIGPROCTERMINATE): Delete.
(EXITCODE_NOSET): Ditto.
* sigproc.cc (no_signals_available): Remove check for hwait_sig. Just rely on
my_sendsig. Pass in an argument controlling when it is appropriate to test
EXITCODE_SET.
(proc_can_be_signalled): Remove checks for myself since this function is never
called in that context.
(sigproc_init): Pre-initialize my_sendsig to non-zero so that
proc_can_be_signalled will know that we expect to be signalable soon.
(sig_send): Change debugging output.
signal thread.
(wait_sig): Correct so that WaitForSingleObject is called when hMainThread is
!= 0, rather than the reverse.
* cygheap.cc (cygheap_fixup_in_child): Clarify potential error message.
* fork.cc (fork_copy): Cosmetic change.
called, since that is the intent of sending a __SIGEXIT. Wait forever for main
thread to go away since, presumably, the main thread told us it was going away.
(av::av): Remove reference to error.
(av::replace0_maybe): Ditto.
(av::dup_maybe): Ditto.
(av::dup_all): Ditto.
(av::unshift): Ditto.
(spawn_guts): On a fault, return E2BIG only if ENOMEM has been set. Otherwise
return EFAULT.
(cygtls::andreas): New element. Replaces _myfault and _myfault_errno.
(cygtls::fault_guarded): Use andreas.
(cygtls::return_from_fault): Ditto.
(cygtls::setup_fault): Add a parameter denoting where to store old fault
handler, if any and use it to "stack" faults.
(cygtls::reset_fault): Restore fault from parameter.
(myfault::sebastian): New variable.
(myfault::~myfault): Pass sebastian to reset_fault.
(myfault::myfault): Store old fault values in sebastian.