* dtable.cc (dtable::vfork_parent_restore): Add debugging statement.

* exceptions.cc (try_to_debug): Spin only as long as we don't have a debugger
attached.
* fhandler.h (fhandler_base::set_nohandle): New method.
(fhandler_base::get_nohandle): New method.
* fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there is no
handle.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle flag on
dummy fd.
* Makefile.in: Make intermediate library for eventual inclusion in libcygwin.a
* fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument setting
since it is no longer used.
* miscfuncs.cc (check_null_str): New function.
(+check_null_str_errno): Ditto.
* net.cc: Add defensive buffer checking throughout.
(cygwin_sendto): Protect against invalid fd.
(cygwin_recvfrom): Ditto.
(cygwin_getpeername): Ditto.
(cygwin_recv): Ditto.
(cygwin_send): Ditto.
* winsup.h: Declare a new function.
* select.cc (set_bits): Fix conditional for setting fd in exceptfds.
* dtable.cc (dtable::build_fhandler): Create fhandler_pipe using correct device
type.
* path.cc (get_devn): Set correct pipe device type from device name.
This commit is contained in:
Christopher Faylor
2001-11-24 03:11:39 +00:00
parent 97a2e0756d
commit 5a64d86941
12 changed files with 301 additions and 150 deletions

View File

@ -18,6 +18,7 @@ details. */
#include <unistd.h>
#include <fcntl.h>
#include <sys/cygwin.h>
#include <assert.h>
#define USE_SYS_TYPES_FD_SET
#include <winsock.h>
@ -292,7 +293,7 @@ dtable::build_fhandler (int fd, DWORD dev, const char *name, int unit)
case FH_PIPE:
case FH_PIPER:
case FH_PIPEW:
fh = cnew (fhandler_pipe) ();
fh = cnew (fhandler_pipe) (dev);
break;
case FH_SOCKET:
if ((fh = cnew (fhandler_socket) ()))
@ -591,6 +592,7 @@ dtable::vfork_parent_restore ()
close_all_files ();
fhandler_base **deleteme = fds;
assert (fds_on_hold != NULL);
fds = fds_on_hold;
fds_on_hold = NULL;
cfree (deleteme);