|
From: | Paolo Bonzini |
Subject: | Re: sed bug on seekable stdin |
Date: | Mon, 18 Dec 2006 15:45:01 +0100 |
User-agent: | Thunderbird 1.5.0.8 (Macintosh/20061025) |
Eric Blake wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 POSIX requires the following behavior [1]: $ rm -Rf file $ echo a b | tr ' ' '\n' > file $ (sed -n 1q; cat) < file b
It turns out, as Ralf reported, that CVS sed actually works like this already, because it explicitly uses fdopen to reopen stdin (this is necessary to support --binary on cygwin), and so it always closes stdin before exiting.
Thanks for the report anyway! Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |