Subject: Re: CVS commit: basesrc
To: None <christos@netbsd.org>
From: Jaromír <jdolecek@netbsd.org>
List: source-changes
Date: 02/21/2001 21:05:29
This probably fixes also bin/12239 (I was not able to reproduce the problem).
Thanks!

Jaromir

Christos Zoulas wrote:
> 
> 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.
> 
> 


-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, dammit!  @@@@