From: Stelian Pop Date: Thu, 12 Apr 2001 13:14:14 +0000 (+0000) Subject: Fixed a socket descriptor leak in dump. X-Git-Tag: release_0_4b22~13 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=700b236e8f7d2d64fe86cb231f041f151a0fe02c;p=dump.git Fixed a socket descriptor leak in dump. --- diff --git a/CHANGES b/CHANGES index 9eeb369..c5fb0ca 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.111 2001/04/11 13:42:52 stelian Exp $ +$Id: CHANGES,v 1.112 2001/04/12 13:14:14 stelian Exp $ Changes between versions 0.4b21 and 0.4b22 (released ????????????????) ====================================================================== @@ -50,6 +50,10 @@ Changes between versions 0.4b21 and 0.4b22 (released ????????????????) (files ending with holes didn't get dumped or restored correctly). +10. Fixed a socket descriptor leak in dump, which leaved opened + 3 file descriptors per dump process (and there is one dump + process per tape). + Changes between versions 0.4b20 and 0.4b21 (released January 13, 2001) ====================================================================== diff --git a/dump/tape.c b/dump/tape.c index 8c62acb..38dd804 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.41 2001/04/10 12:46:53 stelian Exp $"; + "$Id: tape.c,v 1.42 2001/04/12 13:14:15 stelian Exp $"; #endif /* not lint */ #include @@ -994,6 +994,8 @@ enslave(void) doslave(cmd[0], i); Exit(X_FINOK); } + else + close(cmd[0]); } #ifdef LINUX_FORK_BUG diff --git a/restore/restore.c b/restore/restore.c index 8615204..c0e6b32 100644 --- a/restore/restore.c +++ b/restore/restore.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: restore.c,v 1.15 2001/04/10 12:46:53 stelian Exp $"; + "$Id: restore.c,v 1.16 2001/04/12 13:14:15 stelian Exp $"; #endif /* not lint */ #include @@ -50,6 +50,7 @@ static const char rcsid[] = #ifdef __linux__ #include #include +#include #include #include #else /* __linux__ */