Passed
Push — master ( 8d3090...594060 )
by Shinji
02:52 queued 01:02
created

Pcntl::wifstopped()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * This file is part of the sj-i/php-profiler package.
5
 *
6
 * (c) sji <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace PhpProfiler\Lib\Process\Exec\Internal;
15
16
class Pcntl
17
{
18
    public function fork(): int
19
    {
20
        return \pcntl_fork();
21
    }
22
23
    /** @param-out int $status */
24
    public function waitpid(int $process_id, ?int &$status, int $flags = 0): int
25
    {
26
        return \pcntl_waitpid(
27
            $process_id,
28
            $status,
29
            $flags
30
        );
31
    }
32
33
    public function wifstopped(int $status): bool
34
    {
35
        return \pcntl_wifstopped($status);
36
    }
37
38
    public function wstopsig(int $status): int|false
39
    {
40
        return \pcntl_wstopsig($status);
41
    }
42
}
43