* cygheap.h (class process_lock): New class.

* dtable.h (class dtable): Add class process_lock as a friend.
* dcrt0.cc (get_exit_lock): Delete.
(do_exit): Use process_lock class instead of get_exit_lock.
* exceptions.cc (signal_exit): Ditto.
* pinfo.cc (pinfo::exit): Ditto.
(_pinfo::commune_process): Set process lock around this whole function.
(_pinfo::commune_request): Use process_lock rather than myself.lock.
* pinfo.h (pinfo::_lock): Delete.
(pinfo::initialize_lock): Delete.
(pinfo::lock): Delete.
(pinfo::unlock): Delete.
* winsup.h (get_exit_lock): Delete declaration.
This commit is contained in:
Christopher Faylor
2005-10-03 17:23:54 +00:00
parent 8afb8202d4
commit fa35a1ee5c
8 changed files with 49 additions and 23 deletions

View File

@ -26,6 +26,10 @@ details. */
#include "shared_info.h"
#include "perprocess.h"
#include "security.h"
#include "path.h"
#include "fhandler.h"
#include "dtable.h"
#include "cygheap.h"
#define CALL_HANDLER_RETRY 20
@ -1179,7 +1183,7 @@ signal_exit (int rc)
TerminateProcess (hExeced, sigExeced = rc);
}
get_exit_lock ();
process_lock until_exit (true);
if (hExeced || exit_state)
myself.exit (rc);