summaryrefslogtreecommitdiff
path: root/lib/closeout.c
AgeCommit message (Collapse)Author
2004-11-23Revert last change, since it seems EBADF is always defined.Jim Meyering
2004-11-22(EBADF): Fail with `#error ...' if it's not defined,Jim Meyering
asking the user to report the problem.
2004-11-14(close_stdout): Don't fail just because stdout wasJim Meyering
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' >&-
2004-11-06Ensure that no close failure goes unreported.Jim Meyering
(close_stdout): Always close stdout. I.e., don't return early when it seems there's nothing to flush. Don't include __fpending.h.
2004-10-04Sync from gnulib, to remove dependencies of other modules on unlocked-io.Paul Eggert
2004-08-02Update copyright.Paul Eggert
2004-08-02(errno): Remove decl; we now assume C89 or better.Paul Eggert
2003-07-19Likewise. Include "closeout.h" right after config.h,Jim Meyering
to test that it can stand by itself. Include "exitfail.h". Clients should set exit_failure instead. (EXIT_FAILURE): Remove; no longer needed. Do not include <stdlib.h>.
2002-11-23From gnulib, by Bruno HaibleJim Meyering
* closeout.c: Include gettext.h instead of <libintl.h>.
2001-12-20(close_stdout_status): If ferror (stdout), doJim Meyering
not silently exit merely because the output buffer happens to have nothing pending.
2001-11-17Include unlocked-io.h.Jim Meyering
2000-08-26Include "__fpending.h".Jim Meyering
(close_stdout_status): Return right away if there's nothing to flush.
2000-05-16<sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):Jim Meyering
Remove; no longer needed. "quotearg.h": Add include. (file_name): Do not bother to explicitly initialize to NULL; it's less efficient on some hosts. (close_stdout_status): Remove test as to whether stdout was already closed; it breaks for the case "echo x | sort >&-". Quote file name colons. Do not assume that _("write error") lacks format strings.
2000-05-15(close_stdout_set_file_name): New function.Jim Meyering
(close_stdout_status): Use new file-scoped global. Return right away if fstat says the stdout file descriptor is invalid.
2000-05-10[default_exit_status]: New file-scoped variable.Jim Meyering
(close_stdout_set_status): New function.
1999-04-04fix commentsJim Meyering
add FIXME
1999-01-25Add comments.Jim Meyering
1998-03-15Use #if, not #ifdef with HAVE_ macrosJim Meyering
1998-01-04.Jim Meyering