Subject: Re: bin/774: compress interacts in unexpected way with fdesc filesystem
To: None <brad@anduin.eldar.org>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 02/02/1995 06:55:42
> cd /tmp
> cp /etc/hosts hosts
> compress < hosts > h.Z
> At this point a message will me printed on stderr asking
> whether or not '/dev/stdin' should be overwritten.
And if you supply -f, compress will try to remove /dev/stdin or
/dev/stdout, depending on whether the compress succeeds or not. The
attempt will fail, because you can't remove fdesc's /dev/std{in,out},
but it will cause compress to produce a confusing noise message.
In my opinion, the correct thing is to pass magic tokens to compress()
and decompress() for standard input and output, rather than passing
/dev/stdin and /dev/stdout and letting everything happen "normally".
der Mouse
mouse@collatz.mcrcim.mcgill.edu