]> git.wh0rd.org - dump.git/commitdiff
Fixed a socket descriptor leak in dump.
authorStelian Pop <stelian@popies.net>
Thu, 12 Apr 2001 13:14:14 +0000 (13:14 +0000)
committerStelian Pop <stelian@popies.net>
Thu, 12 Apr 2001 13:14:14 +0000 (13:14 +0000)
CHANGES
dump/tape.c
restore/restore.c

diff --git a/CHANGES b/CHANGES
index 9eeb3694194f6ad7723e3dbaf697b75d170252f9..c5fb0ca83b5fb36c5e1f0553d653edff2f14574d 100644 (file)
--- 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)
 ======================================================================
 
index 8c62acb487131841c6ac2db4bdfc01fa627efed5..38dd80426f4a798dd3880c70f917e441834f07d6 100644 (file)
@@ -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 <config.h>
@@ -994,6 +994,8 @@ enslave(void)
                        doslave(cmd[0], i);
                        Exit(X_FINOK);
                }
+               else
+                       close(cmd[0]);
        }
 
 #ifdef LINUX_FORK_BUG
index 86152040d158624e53693f007a812f138f7f6990..c0e6b328fa0e1e46f0da72e7b1952e10bc8133fc 100644 (file)
@@ -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 <config.h>
@@ -50,6 +50,7 @@ static const char rcsid[] =
 #ifdef __linux__
 #include <sys/param.h>
 #include <sys/time.h>
+#include <time.h>
 #include <linux/ext2_fs.h>
 #include <bsdcompat.h>
 #else  /* __linux__ */