From: Dan Boger Date: Tue, 22 Dec 2009 19:19:48 +0000 (-0800) Subject: Work around a bug in irssi on gentoo, leading to random zombies lurching about X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/commitdiff_plain/1da24996a0415d1db4c6e971ec8b4e8f7f965b81?ds=sidebyside;hp=9d8b25876e3edf09c253aeee91d91c10c13b4d82 Work around a bug in irssi on gentoo, leading to random zombies lurching about --- diff --git a/twirssi.pl b/twirssi.pl index fd2a48f..267db11 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -7,6 +7,7 @@ use File::Temp; use LWP::Simple; use Data::Dumper; use Encode; +use POSIX qw/:sys_wait_h/; $Data::Dumper::Indent = 1; use vars qw($VERSION %IRSSI); @@ -1185,6 +1186,9 @@ sub monitor_child { if &debug; my ($new_last_poll); + # reap any random leftover processes - work around a bug in irssi on gentoo + waitpid(-1, WNOHANG); + # first time we run we don't want to print out *everything*, so we just # pretend