Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Christos Zoulas <christos@netbsd.org>
List: source-changes
Date: 02/21/2001 21:24:31
Module Name:	basesrc
Committed By:	christos
Date:		Wed Feb 21 19:24:30 UTC 2001

Modified Files:
	basesrc/usr.bin/sort: sort.c

Log Message:
Fix problem when using sort >> foo
If no output file was specified sort fopened("/dev/stdout", "w").
This is *wrong* because "/dev/stdout" will truncate the output file,
thus undoing the append effect the shell had set up. The simple fix
here is to just arrange for outfp = stdout and don't play with /dev/stdout.

While I am here:
	- KNF
	- make pattern for mkstemp have 6 X's.


To generate a diff of this commit:
cvs rdiff -r1.23 -r1.24 basesrc/usr.bin/sort/sort.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.