mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-08-27 19:36:03 +00:00
Actually prefer /dev/full over /dev/null as a replacement for stdin
* lib/stdopen.c (stdopen): Fix improper condition. Avoid leaking extra file descriptor. * src/tar.c (main): Set name of the stdout for diagnostics. Bail out if stdopen fails.
This commit is contained in:
@@ -2751,8 +2751,11 @@ main (int argc, char **argv)
|
||||
|
||||
set_quoting_style (0, DEFAULT_QUOTING_STYLE);
|
||||
|
||||
close_stdout_set_file_name (_("stdout"));
|
||||
/* Make sure we have first three descriptors available */
|
||||
stdopen ();
|
||||
if (!stdopen ())
|
||||
FATAL_ERROR ((0, errno, "%s",
|
||||
_("failed to ensure first three descriptors are available")));
|
||||
|
||||
/* Pre-allocate a few structures. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user