From 9d3c99ee386b5689e0a2f47b41d5048f276ad58a Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 2 Aug 2011 23:31:03 +0200 Subject: [PATCH] i3-wsbar: correctly handle EOF on stdin --- i3-wsbar | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); }); -- 2.39.5