From 993c860f65bee2f37eda9b6b6f909f74ac3ff79c Mon Sep 17 00:00:00 2001 From: dms Date: Wed, 3 Jan 2001 13:42:57 +0000 Subject: [PATCH] - topic minor fix. - POSIX::_exit(0) added: fixes fork problem. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@223 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Misc.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Misc.pl b/src/Misc.pl index a593c3f..3ec5fb5 100644 --- a/src/Misc.pl +++ b/src/Misc.pl @@ -7,8 +7,10 @@ if (&IsParam("useStrict")) { use strict; } +use POSIX qw(_exit); + sub help { - my $topic = $_[0]; + my $topic = shift; my $file = $bot_misc_dir."/blootbot.help"; my %help = (); @@ -37,7 +39,7 @@ sub help { } close FILE; - if (!defined $topic) { + if (!defined $topic or $topic eq "") { &msg($who, $help{'main'}); my $i = 0; @@ -602,6 +604,7 @@ sub Forker { if (&IsParam("forking") and $$ == $bot_pid) { return $noreply unless (&addForked($label)); + ### use select(undef,undef,undef,0.2); ... $SIG{CHLD} = 'IGNORE'; $pid = eval { fork() }; return $noreply if $pid; # parent does nothing @@ -624,7 +627,7 @@ sub Forker { if (defined $pid) { # child. &delForked($label); &status("fork finished for '$label'."); - exit 0; + POSIX::_exit(0); } } -- 2.39.5