* 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

@@ -1289,8 +1289,8 @@ fhandler_disk_file::open (path_conv& real_path, int flags, mode_t mode)
which might return a valid HANDLE without having actually opened
the file.
The only known file system to date is the SUN NFS Solstice Client 3.1
which returns a valid handle when trying to open a file in a non
existant directory. */
which returns a valid handle when trying to open a file in a nonexistent
directory. */
if (real_path.has_buggy_open ()
&& GetFileAttributes (win32_path_name) == (DWORD) -1)
{
@@ -1493,23 +1493,6 @@ fhandler_dev_null::dump (void)
paranoid_printf ("here");
}
/**********************************************************************/
/* fhandler_pipe */
fhandler_pipe::fhandler_pipe (const char *name, DWORD devtype) :
fhandler_base (devtype, name)
{
set_cb (sizeof *this);
}
off_t
fhandler_pipe::lseek (off_t offset, int whence)
{
debug_printf ("(%d, %d)", offset, whence);
set_errno (ESPIPE);
return -1;
}
void
fhandler_base::set_inheritance (HANDLE &h, int not_inheriting)
{