From: Michael Stapelberg Date: Tue, 2 Aug 2011 21:31:03 +0000 (+0200) Subject: i3-wsbar: correctly handle EOF on stdin X-Git-Tag: 4.0.2~58^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9d3c99ee386b5689e0a2f47b41d5048f276ad58a;p=i3%2Fi3 i3-wsbar: correctly handle EOF on stdin --- diff --git a/i3-wsbar b/i3-wsbar index 4e272316..2d546a73 100755 --- a/i3-wsbar +++ b/i3-wsbar @@ -223,7 +223,12 @@ $stdin = AnyEvent->io( fh => \*STDIN, poll => 'r', cb => sub { - chomp (my $line = ); + my $line = ; + if (!defined($line)) { + undef $stdin; + return; + } + chomp($line); $last_line = $line; update_output(); });