]> git.ipfire.org Git - people/stevee/guardian.git/blobdiff - guardian
Do not display warnings for threads anymore.
[people/stevee/guardian.git] / guardian
index d3f7de0ea0c62d3965ce2b7266a57828fb2be1f6..f0d890d9884950abb8f6a767449ec666d4385ff4 100644 (file)
--- a/guardian
+++ b/guardian
@@ -34,6 +34,9 @@ require Guardian::Socket;
 
 use warnings;
 
+# Disable warnings of unjoinded threads when stopping guardian.
+no warnings 'threads';
+
 # Define version.
 my $version ="2.0";
 
@@ -295,7 +298,7 @@ sub StopWorkers () {
        foreach my $worker (@running_workers) {
                # Send the worker the "KILL" signal and detach the
                # thread so perl can do an automatically clean-up.
-               $worker->kill('KILL')->detach();
+               $worker->kill('KILL');
        }
 }