~ubuntu-branches/ubuntu/trusty/libsendmail-pmilter-perl/trusty

« back to all changes in this revision

Viewing changes to PMilter/Server.pm

  • Committer: Bazaar Package Importer
  • Author(s): Hilko Bengen
  • Date: 2003-05-26 15:30:05 UTC
  • Revision ID: james.westby@ubuntu.com-20030526153005-2hg7jlzuiagkqddr
Tags: 0.4.0-1
* Initial Release.
* Could not use pristine sources because doc/milter-protocol.txt is
  non-free. Documented this in README.Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
487
487
                        $nchildren--;
488
488
                }
489
489
 
 
490
                $pid = waitpid(-1, WNOHANG);
 
491
 
490
492
                $SIG{CHLD} = \&sigchld;
491
493
        }
492
494
        local $SIG{CHLD} = \&sigchld;
493
495
 
494
 
        local $SIG{INFO} = sub {
 
496
        local $SIG{IO} = sub {
495
497
                print STDERR "Number of active children: $nchildren\n";
496
498
        };
497
499
 
498
500
        while (1) {
499
 
                my $client = $socket->accept || die "$0: accept: $!\n";
 
501
                my $client = $socket->accept || do {
 
502
                        if ($! != EINTR) {
 
503
                                die "$0: accept: $!\n";
 
504
                        }
 
505
                };
500
506
 
501
507
                # If the load's too high, fail and go back to top of loop.
502
508
                if ($maxchildren) {