summaryrefslogtreecommitdiff
path: root/vipe
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-12-11 15:11:19 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-12-11 15:11:19 -0500
commit931de139ed875e6c593d0bdb692fccf181da46bb (patch)
tree56008d12a6d452ac38207ab1772656ca636f9415 /vipe
parent6f2bc6bff8786f96265b170249b4cd4bc3e99247 (diff)
downloadmoreutils-931de139ed875e6c593d0bdb692fccf181da46bb.tar.gz
vipe: Avoid dying on empty input. Thanks, Anders Kaseorg Closes: #508491
Diffstat (limited to 'vipe')
-rwxr-xr-xvipe4
1 files changed, 2 insertions, 2 deletions
diff --git a/vipe b/vipe
index 8cee2b1..4874fe3 100755
--- a/vipe
+++ b/vipe
@@ -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);