(handle_exceptions): Use _sig_tls rather than sigtid to determine if this is
the signal thread.
(set_signal_mask): Ditto for conditionalized CGF code.
* pinfo.cc (pinfo::exit): Exit the thread if we forcefully terminated the main
thread
* sigproc.cc (sigtid): Delete.
(_sig_tls): Define.
(sig_clear): Use _sig_tls rather than sigtid to determine if this is the signal
thread.
(sig_dispatch_pending): Ditto.
(wait_sig): Set _sig_tls here.
* dcrt0.cc (do_exit): Move sigproc_terminate call later since signal handling
was still needed for subsequent stuff. Call sigproc_terminate with new
exit_state value.
* pinfo.cc (pinfo::exit): Call sigproc_terminate with new exit_state value.
* sigproc.cc (proc_terminate): Remove unnecessary (void) parameter.
(sigproc_terminate): Ditto. Add new argument to accept exit state to be set.
(wait_sig): Reorganize __SIGEXIT handling. Add more debugging output.
* winsup.h (sigproc_terminate): Declare with new exit_state argument.
(exit_states): Reorganize to reflect new exit ordering of sigproc_terminate.
appropriately.
* pinfo.cc (pinfo::exit): Always call sigproc_terminate here. Rely on
sigproc_terminate to signal signal thread to handle eventual process exit.
* sigproc.cc (no_signals_available): Change criteria for determining if this
process can handle signals to itself.
(my_sendsig): New variable. Copy of my sendsig handle.
(proc_can_be_signalled): Don't send signals if exit code is set.
(sigproc_terminate): Use and set exit_state appropriately to determine when to
do anything. Send __SIGEXIT to self to control process exit.
(sig_send): Use my_sendsig for sending signals. Don't call
proc_can_be_signalled for myself since the criteria is now different for
sending signals to myself.
(wait_sig): Copy myself->sendsig to my_sendsig for future use. Exit signal
loop when __SIGEXIT is received. Wait for main thread to exit and use its exit
status to actually exit process.
* sigproc.h (__SIGEXIT): New enum.
* dcrt0.cc (alloc_stack): Eliminate superfluous "return;".
* debug.cc (add_handle): Ditto.
* devices.in (device::parse): Ditto.
* dtable.cc (dtable::vfork_parent_restore): Ditto.
(dtable::vfork_child_fixup): Ditto.
* environ.cc (parse_options): Ditto.
* errno.cc (seterrno_from_win_error): Ditto.
* exceptions.cc (sig_handle_tty_stop): Ditto.
(set_signal_mask): Ditto.
* fhandler.cc (fhandler_base::read): Ditto.
(fhandler_base::operator delete): Ditto.
(fhandler_base::seekdir): Ditto.
(fhandler_base::rewinddir): Ditto.
* fhandler_console.cc (fhandler_console::read): Ditto.
(fhandler_console::fixup_after_exec): Ditto.
* sigproc.cc (sigproc_init): Ditto.
(sigproc_terminate): Ditto.
* devices.cc: Regenerate.
heap. Change fatal error to avoid confusion with cygheap.
* spawn.cc (linebuf::finish): New function.
(linebuf::add): Cosmetic change.
(spawn_guts): Only avoid building windows command line if the program being
executed was actually mounted with -X. Don't return E2BIG if we hit the 32K
size and we're executing a detected cygwin program. Just silently truncate the
windows command line, instead.
* Makefile.am: Add include files under bits sub-directory.
* Makefile.in: Regenerated.
* libc/sys/linux/argp/argp-fs-xinl.c: Set __OPTIMIZE__ to
actual value of 1 to be compatible with newer glibc headers.
* libc/sys/linux/sys/cdefs.h: Fix to be compatible with newer
glibc headers.
* libc/sys/linux/sys/dirent.h: Ditto.
* libc/sys/linux/argp/argp-xinl.c: Ditto.
* libc/sys/linux/dl/dl-runtime.c: Make sure fixup and
profile_fixup routines are marked used so they won't be
optimized away.
* libc/sys/linux/dl/dl-cache.c: Don't use weak_extern macro
to mark functions as weak.
* libc/sys/linux/dl/dl-open.c: Ditto.
* libc/sys/linux/iconv/gconv_open.c: Fix to obey new gcc4
rules about lvalues.
* libc/sys/linux/iconv/gconv_simple.c: Ditto.
* libc/sys/linux/linuxthreads/bits/libc-lock.h: Don't use
weak_extern macro to mark functions as weak. Instead always
use #pragma weak.
* iconvdata/jis0208.h: Fix to work with gcc4.
* libc/sys/linux/dl/dl-load.c: Ditto.
* libc/sys/linux/dl/dl-reloc.c: Ditto.
* libc/sys/linux/dl/do-rel.h: Ditto.
* libc/sys/linux/dl/dynamic-link.h: Ditto.
* libc/sys/linux/include/ltdl.h: Ditto.
* libc/sys/linux/machine/i386/dl-machine.h: Ditto.
* libc/sys/linux/machine/i386/weakalias.h: Ditto.
* libc/sys/linux/net/ns_ntoa.c: Ditto.
* libc/sys/linux/bits/initspin.h: New file.
* libc/sys/linux/bits/libc-lock.h: Ditto.
* libc/sys/linux/bits/pthreadtypes.h: Ditto.
* libc/sys/linux/bits/typesizes.h: Ditto.
(print_version): Ditto.
(cmd_list): Don't depend on terminating '\0' being present on
string-values.
(cmd_get): Don't attempt to read more than present, but keep
extra space for terminating '\0'. Really output REG_BINARY.
Don't leak memory.
(cmd_set): Include trailing '\0' in string's length.
warning.
* path.h (path_conv::set_cygexec): New function.
* spawn.cc (av::iscygwin): Eliminate.
(av::av): Don't initialize iscygwin.
(spawn_guts): Just use real_path.iscygexec for all tests.
(av::fixup): Short circuit test if .exe extension and known cygexec. Set
cygexec flag appropriately if we find that program uses cygwin1.dll.
(dll_crt0_0): Move console initialization earlier.
* init.cc (dll_entry): Move console initialization here.
* exceptions.cc (init_console_handler): Fully remove any old console handler.
* spawn.cc (spawn_guts): Don't fill out windows argv if we've deduced that this
is a cygwin-using program.
(av::fixup): Always check executables to see if they are using cygwin1.dll.
Don't consider .com files to be scripts.
* hookapi.cc (rvadelta): New function.
(PEHeaderFromHModule): Simplify slightly.
(hook_or_detect_cygwin): Use passed in name argument for "HMODULE" rather than
incorrectly reading current program. Calculate delta needed to read image data
and file names if this isn't a real "HMODULE".
2005-09-06 Paul Eggert <eggert@cs.ucla.edu>
* move-if-change: Don't output "$2 is unchanged"; suggested by Ben
Elliston. Handle weird characters correctly.
OP_SH_MTACC_T, OP_MASK_MTACC_T, OP_SH_MTACC_D, OP_MASK_MTACC_D): New
define.
Document !, $, *, &, g, +t, +T operand formats for MT instructions.
(INSN_ASE_MASK): Update to include INSN_MT.
(INSN_MT): New define for MT ASE.
* fork.cc (fork_parent): Don't issue errors if "somebody" has set the
PID_EXITED flag on a child. Don't close process handle if it has potentially
already been closed.
* pinfo.cc (winpids::add): Eliminate PID_ALLPIDS handling which was obsoleted
by previous changes.
* spawn.cc (av::fixup): Do win16 detection for .com files. Make sure that
buffer has been unmapped in all cases.
* configure.host: Set have_crt0 to no for Arm targts when not
providing syscalls. Set sys_dir=arm unconditionally.
Default have_crt0 based on sys_dir.
* configure.in: Use have_crt0.
* libc/configure.in: Ditto.
* libc/sys/configure.in: Ditto.
* configure: Regenerate.
* libc/configure: Regenerate.
* libc/sys/configure: Regenerate.
* libc/sys/arm/Makefile.am (lib_a_SOURCES): Add aeabi_atexit.c.
Only build other files when providing syscalls.
* libc/sys/arm/Makefile.in: Regenerate.
* libc/sys/arm/aeabi_atexit.c: New file.
(_cygtls::return_from_fault): Use __ljfault.
* exceptions.cc (set_signal_mask): Revert previous checkin.
* gendef (__sjfault): Split out into a separate function which doesn't bother
with any special signal locking. routines.
(_ljfault): Return from a __sjfault without bothering with signals.
* Makefile.in: Remove extra anchor to make NN4 happy.
* faq.xml: Link to cygwin.com/license.html
* faq-resources.xml: Link instead of duplicating info.
* faq-using.xml: Split out services and network shares FAQ.
* faq-what.xml: Link to cygwin.com/license.html
intact throughout.
(normalize_win32_path): Revert to only checking for slash.
(realpath): Convert drive letters to cygdrive paths before
doing anything else.
* shared_info.h (mount_info::cygdrive_posix_path): Make public.