diff options
author | 2010-07-24 01:10:12 +0000 | |
---|---|---|
committer | 2010-07-24 01:10:12 +0000 | |
commit | f081e678dadf51a99c6a6ddfc6379af4890e29a6 (patch) | |
tree | 8a154ac915fcf3d607804afbea72105ced13c534 /usr.bin/patch/patch.c | |
parent | Include pid file name in error message for a failed kill(). Prompted by (diff) | |
download | wireguard-openbsd-f081e678dadf51a99c6a6ddfc6379af4890e29a6.tar.xz wireguard-openbsd-f081e678dadf51a99c6a6ddfc6379af4890e29a6.zip |
Send normal output to stdout instead of everything to stderr. This
is currently done in the latest versions of GNU patch.
Please watch out for output appearing out-of-order.
Discussed with millert and deraadt.
OK deraadt
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r-- | usr.bin/patch/patch.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c index d95f5c05007..19e41c42295 100644 --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: patch.c,v 1.48 2009/10/27 23:59:41 deraadt Exp $ */ +/* $OpenBSD: patch.c,v 1.49 2010/07/24 01:10:12 ray Exp $ */ /* * patch - a program to apply diffs to original files @@ -109,9 +109,6 @@ static bool reverse_flag_specified = false; /* buffer holding the name of the rejected patch file. */ static char rejname[NAME_MAX + 1]; -/* buffer for stderr */ -static char serrbuf[BUFSIZ]; - /* how many input lines have been irretractibly output */ static LINENUM last_frozen_line = 0; @@ -150,7 +147,8 @@ main(int argc, char *argv[]) const char *tmpdir; char *v; - setbuf(stderr, serrbuf); + setlinebuf(stdout); + setlinebuf(stderr); for (i = 0; i < MAXFILEC; i++) filearg[i] = NULL; |