]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Daemon.pm
run update-copyrights from gnulib for 2019
[public-inbox.git] / lib / PublicInbox / Daemon.pm
index 2046a7f5abffd382d8a79f2e7aa2c5ee1d923432..b3743f5c3ddf80d608c7becf4bc48d242f04eb88 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
+# Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # contains common daemon code for the nntpd and httpd servers.
 # This may be used for read-only IMAP server if we decide to implement it.
@@ -8,6 +8,7 @@ use warnings;
 use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
 use IO::Handle;
 use IO::Socket;
+use POSIX qw(WNOHANG);
 use Socket qw(IPPROTO_TCP SOL_SOCKET);
 sub SO_ACCEPTFILTER () { 0x1000 }
 use Cwd qw/abs_path/;
@@ -15,7 +16,6 @@ STDOUT->autoflush(1);
 STDERR->autoflush(1);
 use PublicInbox::DS qw(now);
 require PublicInbox::EvCleanup;
-require POSIX;
 require PublicInbox::Listener;
 require PublicInbox::ParentPipe;
 my @CMD;
@@ -437,7 +437,7 @@ sub upgrade_aborted ($) {
 
 sub reap_children () {
        while (1) {
-               my $p = waitpid(-1, &POSIX::WNOHANG) or return;
+               my $p = waitpid(-1, WNOHANG) or return;
                if (defined $reexec_pid && $p == $reexec_pid) {
                        upgrade_aborted($p);
                } elsif (defined(my $id = delete $pids{$p})) {