Article View: net.bugs
Article #152Tar bug, runs out of files
From: wescott
Date: Wed, 07 Dec 1983 21:47
Date: Wed, 07 Dec 1983 21:47
39 lines
1302 bytes
1302 bytes
Forgive me if this one has been reported before (I'd be
surprised if it hadn't). Tar stops processing files
after coming across a number of non S_IFREG files.
It doesn't close the open file after opening and fstat'ing
it. Hence tar can run out of file descriptors.
The bug has been seen in every version we've looked at
(v7, III, 4.1, 5.0) If this is supposed to be a feature
let me know.
In the meantime our fix is to add a close in putfile():
putfile(longname, shortname)
char *longname;
char *shortname;
{
.
.
.
infile = open(shortname, 0);
.
.
.
if ((stbuf.st_mode & S_IFMT) != S_IFREG) {
fprintf(stderr, "tar: %s is not a file. Not dumped\n", longname);
close(infile); /**********bug fix************/
return;
}
.
.
.
}
===========================
Michael Wescott
NCR Corp., West Columbia, SC 29169
...duke!mcnc!ncsu!ncrcae!wescott
Technical Details
Message-ID:
<1030@ncrcae.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!decvax!duke!mcnc!ncsu!ncrcae!wescottShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!duke!mcnc!ncsu!ncrcae!wescott From: wescott@ncrcae.UUCP Newsgroups: net.bugs Subject: Tar bug, runs out of files Message-ID: <1030@ncrcae.UUCP> Date: Wed, 7-Dec-83 16:47:30 EST Article-I.D.: ncrcae.1030 Posted: Wed Dec 7 16:47:30 1983 Date-Received: Sun, 11-Dec-83 00:45:02 EST Lines: 39