summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-03-04 17:02:15 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2017-03-04 17:02:15 +0000
commit109b7eb1b04aaaea7fd6c75108f99c7fcac15874 (patch)
tree405400e21f09df540d081dc86378e4ac5c5e49e4
parent8d3bb6f58c24666b105820044fdaa4dff49dd661 (diff)
Testsuite: do not wait forever for exim daemon to start up
-rwxr-xr-xtest/runtest4
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/)