]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix for bug 116, in addition an improvement of the regex is made
authorDjSlash <djslash@djslash.org>
Fri, 18 Mar 2011 15:02:29 +0000 (16:02 +0100)
committerDjSlash <djslash@djslash.org>
Fri, 18 Mar 2011 15:04:17 +0000 (16:04 +0100)
make/template/inspircd

index 1b9f25a866b49731003848d081352816fe579fdd..d5e89040ddd6a240a0285732e23da77659023ac2 100644 (file)
@@ -380,7 +380,7 @@ sub getpidfile
 sub getstatus {
        my $pid = getprocessid();
        return 0 if $pid == 0;
-       return kill 0, $1;
+       return kill 0, $pid;
 }
 
 
@@ -389,7 +389,7 @@ sub getprocessid {
        open PIDFILE, '<', $pidfile or return 0;
        while(<PIDFILE>)
        {
-               /(\d+)/ and $pid = $1;
+               /^(\d+)$/ and $pid = $1;
        }
        close PIDFILE;
        return $pid;