summaryrefslogtreecommitdiff
path: root/ext/pcntl/pcntl.stub.php
blob: 1bb1f69709ac50f267c11e556c5bf882aac1b964 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php

function pcntl_fork(): int {}

function pcntl_waitpid(int $pid, &$status, int $options = 0, &$rusage = []): int {}

function pcntl_wait(&$status, int $options = 0, &$rusage = []): int {}

/**
 * @param callable|int $handler
 */
function pcntl_signal(int $signo, $handler, bool $restart_syscalls = true): bool {}

/** @return mixed */
function pcntl_signal_get_handler(int $signo) {}

function pcntl_signal_dispatch(): bool {}

#ifdef HAVE_SIGPROCMASK
function pcntl_sigprocmask(int $how, array $set, &$oldset = null): bool {}
#endif

#ifdef HAVE_STRUCT_SIGINFO_T
#if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
/** @return int|false */
function pcntl_sigwaitinfo(array $set, &$info = []) {}

/** @return int|false */
function pcntl_sigtimedwait(array $set, &$info = [], int $seconds = 0, int $nanoseconds = 0) {}
#endif
#endif

function pcntl_wifexited(int $status): bool {}

function pcntl_wifstopped(int $status): bool {}

#ifdef HAVE_WCONTINUED
function pcntl_wifcontinued(int $status): bool {}
#endif

function pcntl_wifsignaled(int $status): bool {}

/** @return int|false */
function pcntl_wifexitstatus(int $status) {}

/** @return int|false */
function pcntl_wtermsig(int $status) {}

/** @return int|false */
function pcntl_wstopsig(int $status) {}

/** @return false */
function pcntl_exec(string $path, array $args = [], array $envs = []): bool {}

function pcntl_alarm(int $seconds): int {}

function pcntl_get_last_error(): int {}

#ifdef HAVE_GETPRIORITY
/** @return int|false */
function pcntl_getpriority(int $pid = UNKNOWN, int $process_identifier = PRIO_PROCESS) {}
#endif

#ifdef HAVE_SETPRIORITY
function pcntl_setpriority(int $priority, int $pid = UNKNOWN, int $process_identifier = PRIO_PROCESS): bool{}
#endif

function pcntl_strerror(int $errno): string {}

function pcntl_async_signals(bool $on = UNKNOWN): bool {}

#ifdef HAVE_UNSHARE
function pcntl_unshare(int $flags): bool {}
#endif