/[Apache-SVN]
ViewVC logotype

Revision 1543868


Jump to revision: Previous Next
Author: julianfoad
Date: Wed Nov 20 16:44:15 2013 UTC (10 years, 5 months ago)
Changed paths: 10
Log Message:
In all of the command-line programs, flush stdout before exiting, in order
to report consistently if any information written to standard output is
being lost.

Standard output would be flushed on exit anyway, but this makes sure that
output is not silently lost if it fails. We will get both an error message
on stderr and a non-zero exit code.

See issue #780 "Check printf return values" and r1499470 "Also flush stdout
when returning an error".

A flush was present in some of the programs already, but was not guaranteed
to be executed in all cases, and only since r1499470 has an error-returning
code path been subject to a flush. This is now consistent across all the
programs, whether exiting successfully or with an error, except for a few
irregular exit paths that still remain, such as some calls to exit().

* subversion/svnadmin/svnadmin.c,
  subversion/svnauth/svnauth.c,
  subversion/svndumpfilter/svndumpfilter.c,
  subversion/svnlook/svnlook.c,
  subversion/svnmucc/svnmucc.c,
  subversion/svnrdump/svnrdump.c,
  subversion/svnserve/svnserve.c,
  subversion/svn/svn.c,
  subversion/svnsync/svnsync.c,
  subversion/svnversion/svnversion.c
  (sub_main): Remove the flush on the main successful code path for
    svnadmin, svnauth, svndumpfilter, svnlook, svnmucc, svnversion; on the
    main successful and main failure code paths for 'svn'.
  (main): Flush here, instead, and report both the main error (if any) and
    any flush error.


Changed paths

Path Details
Directorysubversion/trunk/subversion/svn/svn.c modified , text changed
Directorysubversion/trunk/subversion/svnadmin/svnadmin.c modified , text changed
Directorysubversion/trunk/subversion/svnauth/svnauth.c modified , text changed
Directorysubversion/trunk/subversion/svndumpfilter/svndumpfilter.c modified , text changed
Directorysubversion/trunk/subversion/svnlook/svnlook.c modified , text changed
Directorysubversion/trunk/subversion/svnmucc/svnmucc.c modified , text changed
Directorysubversion/trunk/subversion/svnrdump/svnrdump.c modified , text changed
Directorysubversion/trunk/subversion/svnserve/svnserve.c modified , text changed
Directorysubversion/trunk/subversion/svnsync/svnsync.c modified , text changed
Directorysubversion/trunk/subversion/svnversion/svnversion.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26