File size: 383 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Bug #73783: (SIG_IGN needs to be set to prevent syscals from returning early)
--EXTENSIONS--
pcntl
posix
--FILE--
<?php
pcntl_signal(SIGCHLD, SIG_IGN);

switch(pcntl_fork()) {
    case 0:
        exit;
        break;
}

$before = microtime(true);
sleep(1);

if (microtime(true) - $before >= 0.8) {
    echo "working\n";
} else {
    echo "failed\n";
}
?>
--EXPECT--
working