diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-09-20 11:29:48 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-09-20 11:29:48 +0000 |
commit | 8e54fb88f368b4f582d2f40b42056d730dd229bc (patch) | |
tree | 6e22b77d8a61dfd723c61adf3d9fa233bccc8f01 /winsup/cygwin/fhandler_raw.cc | |
parent | f4e6b76a05b9e0a0c851b0473eb51285028e3e41 (diff) | |
download | newlib-8e54fb88f368b4f582d2f40b42056d730dd229bc.zip newlib-8e54fb88f368b4f582d2f40b42056d730dd229bc.tar.gz newlib-8e54fb88f368b4f582d2f40b42056d730dd229bc.tar.bz2 |
* fhandler.h (fhandler_socket::fixup_after_exec): Remove inline
implementation.
(fhandler_dev_raw::fixup_after_exec): Ditto.
* fhandler_raw.cc (fhandler_dev_raw::fixup_after_fork): Don't
duplicate buffer on fork to avoid memory leak.
(fhandler_dev_raw::fixup_after_exec): New implementation equal to
former fixup_after_fork() implementation.
* fhandler_socket.cc (fhandler_socket::fixup_after_fork): Do
nothing when not using Winsock2.
(fhandler_socket::fixup_after_exec): New implementation.
(fhandler_socket::set_close_on_exec): Never call set_inheritance().
Diffstat (limited to 'winsup/cygwin/fhandler_raw.cc')
-rw-r--r-- | winsup/cygwin/fhandler_raw.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler_raw.cc index a5befb6..7ed439b 100644 --- a/winsup/cygwin/fhandler_raw.cc +++ b/winsup/cygwin/fhandler_raw.cc @@ -468,6 +468,14 @@ fhandler_dev_raw::dup (fhandler_base *child) void fhandler_dev_raw::fixup_after_fork (HANDLE) { + devbufstart = 0; + devbufend = 0; + lastblk_to_read = 0; +} + +void +fhandler_dev_raw::fixup_after_exec (HANDLE) +{ if (devbufsiz > 1L) devbuf = new char [devbufsiz]; devbufstart = 0; |