diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2017-03-04 17:02:15 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2017-03-04 17:02:15 +0000 |
commit | 109b7eb1b04aaaea7fd6c75108f99c7fcac15874 (patch) | |
tree | 405400e21f09df540d081dc86378e4ac5c5e49e4 | |
parent | 8d3bb6f58c24666b105820044fdaa4dff49dd661 (diff) |
Testsuite: do not wait forever for exim daemon to start up
-rwxr-xr-x | test/runtest | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/runtest b/test/runtest index 1fe7636da..b2178497d 100755 --- a/test/runtest +++ b/test/runtest @@ -2322,7 +2322,6 @@ elsif (/^((?i:[A-Z\d_]+=\S+\s+)+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+ if ($cmd =~ /\s-DSERVER=server\s/ && $cmd !~ /\s-DNOTDAEMON\s/) { - $pidfile = "$parm_cwd/spool/exim-daemon.pid"; if ($debug) { printf ">> daemon: $cmd\n"; } run_system("sudo mkdir spool/log 2>/dev/null"); run_system("sudo chown $parm_eximuser:$parm_eximgroup spool/log"); @@ -2349,7 +2348,8 @@ elsif (/^((?i:[A-Z\d_]+=\S+\s+)+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+ while (<SCRIPT>) { $lineno++; last if /^\*{4}\s*$/; } # Ignore any input # Interlock with daemon startup - while (! stat("$pidfile") ) { select(undef, undef, undef, 0.3); } + for (my $count = 0; ! stat("$pidfile") && $count < 30; $count++ ) + { select(undef, undef, undef, 0.3); } return 3; # Don't wait } elsif ($cmd =~ /\s-DSERVER=wait:(\d+)\s/) |