diff options
author | Christopher Faylor <me@cgf.cx> | 2013-01-14 06:03:59 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-01-14 06:03:59 +0000 |
commit | b712b4408ac6364121d9478af4ac82290ce4b72a (patch) | |
tree | b6c75257dc3628d919b4ed66625d0262130ef2e3 /winsup/cygwin/pinfo.cc | |
parent | cdc1925e021287aca3be485ad1059ce3e244e2c1 (diff) | |
download | cygnal-b712b4408ac6364121d9478af4ac82290ce4b72a.tar.gz cygnal-b712b4408ac6364121d9478af4ac82290ce4b72a.tar.bz2 cygnal-b712b4408ac6364121d9478af4ac82290ce4b72a.zip |
* exceptions.cc (signal_exit): Move captive process termintation...
(_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.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 6bd05131b..ba7b2da56 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -175,18 +175,16 @@ pinfo::maybe_set_exit_code_from_windows () void pinfo::exit (DWORD n) { - minimal_printf ("winpid %d, exit %d", GetCurrentProcessId (), n); - sigproc_terminate (ES_FINAL); + debug_only_printf ("winpid %d, exit %d", GetCurrentProcessId (), n); + proc_terminate (); lock_process until_exit (true); cygthread::terminate (); if (n != EXITCODE_NOSET) self->exitcode = EXITCODE_SET | n;/* We're really exiting. Record the UNIX exit code. */ else - { - exit_state = ES_EXEC_EXIT; - maybe_set_exit_code_from_windows (); - } + maybe_set_exit_code_from_windows (); /* may block */ + exit_state = ES_FINAL; if (myself->ctty > 0 && !iscons_dev (myself->ctty)) { |