* exceptions.cc (setup_handler): Always relinquish lock after we've

interrupted.
* fhandler.cc: Move pipe methods to pipe.cc.
* fhandler.h (fhandler_pipe): Add new methods.
* fork.cc (sync_with_parent): Make error messages more informative.
* pipe.cc (fhandler_pipe::fhandler_pipe): Move here from fhandler.cc.
(fhandler_pipe::lseek): Ditto.
(fhandler_pipe::set_close_on_exec): New method.
(fhandler_pipe::read): Ditto.
(fhandler_pipe::close): Ditto.
(fhandler_pipe::dup): Ditto.
(make_pipe): Create the guard mutex on the read side of the pipe.
* select.cc (peek_pipe): Use guard_mutex to discover if we have the right to
read on this pipe.
(fhandler_pipe::readh_for_read): Pass the read pipe guard mutex to peek_pipe.
* syscalls.cc (_read): Always detect signal catchers, for now.
* debug.cc (makethread): Eliminate hack to make thread inheritable.
* sigproc.cc (subproc_init): Don't use hack to make thread inheritable.
This commit is contained in:
Christopher Faylor
2001-09-22 16:55:02 +00:00
parent 142920f65a
commit 5e733918c0
10 changed files with 120 additions and 56 deletions

View File

@ -105,7 +105,6 @@ makethread (LPTHREAD_START_ROUTINE start, LPVOID param, DWORD flags,
{
DWORD tid;
HANDLE h;
SECURITY_ATTRIBUTES *sa;
thread_start *info; /* Various information needed by the newly created thread */
for (;;)
@ -123,16 +122,9 @@ out:
info->func = start; /* Real function to start */
info->arg = param; /* The single parameter to the thread */
if (*name != '+')
sa = &sec_none_nih; /* The handle should not be inherited by subprocesses. */
else
{
name++;
sa = &sec_none; /* The handle should be inherited by subprocesses. */
}
if ((h = CreateThread (sa, 0, thread_stub, (VOID *) info, flags, &tid)))
regthread (name, tid); /* Register this name/thread id for debugging output. */
if ((h = CreateThread (&sec_none_nih, 0, thread_stub, (VOID *) info, flags,
&tid)))
regthread (name, tid); /* Register for debugging output. */
return h;
}