diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-12-11 15:11:19 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-12-11 15:11:19 -0500 |
commit | 931de139ed875e6c593d0bdb692fccf181da46bb (patch) | |
tree | 56008d12a6d452ac38207ab1772656ca636f9415 /vipe | |
parent | 6f2bc6bff8786f96265b170249b4cd4bc3e99247 (diff) | |
download | moreutils-931de139ed875e6c593d0bdb692fccf181da46bb.tar.gz |
vipe: Avoid dying on empty input. Thanks, Anders Kaseorg Closes: #508491
Diffstat (limited to 'vipe')
-rwxr-xr-x | vipe | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -43,7 +43,7 @@ $/=undef; my ($fh, $tmp)=tempfile(); die "cannot create tempfile" unless $fh; -print $fh <STDIN> || die "write temp: $!"; +print ($fh <STDIN>) || die "write temp: $!"; close $fh; close STDIN; open(STDIN, "</dev/tty") || die "reopen stdin: $!"; @@ -67,6 +67,6 @@ if ($ret != 0) { } open (IN, $tmp) || die "$0: cannot read $tmp: $!\n"; -print OUT <IN> || die "write failure: $!"; +print (OUT <IN>) || die "write failure: $!"; close IN; unlink($tmp); |