]> git.ipfire.org Git - thirdparty/coreutils.git/commit
(close_stdout): Don't fail just because stdout was
authorJim Meyering <jim@meyering.net>
Sun, 14 Nov 2004 00:20:01 +0000 (00:20 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 14 Nov 2004 00:20:01 +0000 (00:20 +0000)
commitf094ac44130b59eb3beb5ec53af1c8342732d5df
tree0b2727c8f73d910368e1d7d7298be9d2f7153a3e
parentd417dd764f80e3ec638a5bf3ff2a62e695537295
(close_stdout): Don't fail just because stdout was
closed initially, since some programs don't write to stdout in the
normal course of operation (other than --version and --help), and
we don't want this function to make e.g. `cp 1 2 >&-' fail.
But do fail if it was closed and someone has tried to write to it.
E.g., printf 'foo' >&-
lib/closeout.c