1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef PHP_PCNTL_H
22 #define PHP_PCNTL_H
23
24 extern zend_module_entry pcntl_module_entry;
25 #define phpext_pcntl_ptr &pcntl_module_entry
26
27 PHP_MINIT_FUNCTION(pcntl);
28 PHP_MSHUTDOWN_FUNCTION(pcntl);
29 PHP_RINIT_FUNCTION(pcntl);
30 PHP_RSHUTDOWN_FUNCTION(pcntl);
31 PHP_MINFO_FUNCTION(pcntl);
32
33 PHP_FUNCTION(pcntl_alarm);
34 PHP_FUNCTION(pcntl_fork);
35 PHP_FUNCTION(pcntl_waitpid);
36 PHP_FUNCTION(pcntl_wait);
37 PHP_FUNCTION(pcntl_wifexited);
38 PHP_FUNCTION(pcntl_wifstopped);
39 PHP_FUNCTION(pcntl_wifsignaled);
40 PHP_FUNCTION(pcntl_wexitstatus);
41 PHP_FUNCTION(pcntl_wtermsig);
42 PHP_FUNCTION(pcntl_wstopsig);
43 PHP_FUNCTION(pcntl_signal);
44 PHP_FUNCTION(pcntl_signal_dispatch);
45 PHP_FUNCTION(pcntl_get_last_error);
46 PHP_FUNCTION(pcntl_strerror);
47 #ifdef HAVE_SIGPROCMASK
48 PHP_FUNCTION(pcntl_sigprocmask);
49 #endif
50 #if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
51 PHP_FUNCTION(pcntl_sigwaitinfo);
52 PHP_FUNCTION(pcntl_sigtimedwait);
53 #endif
54 PHP_FUNCTION(pcntl_exec);
55 #ifdef HAVE_GETPRIORITY
56 PHP_FUNCTION(pcntl_getpriority);
57 #endif
58 #ifdef HAVE_SETPRIORITY
59 PHP_FUNCTION(pcntl_setpriority);
60 #endif
61
62 struct php_pcntl_pending_signal {
63 struct php_pcntl_pending_signal *next;
64 long signo;
65 };
66
67 ZEND_BEGIN_MODULE_GLOBALS(pcntl)
68 HashTable php_signal_table;
69 int processing_signal_queue;
70 struct php_pcntl_pending_signal *head, *tail, *spares;
71 int last_error;
72 volatile char pending_signals;
73 ZEND_END_MODULE_GLOBALS(pcntl)
74
75 #ifdef ZTS
76 #define PCNTL_G(v) TSRMG(pcntl_globals_id, zend_pcntl_globals *, v)
77 #else
78 #define PCNTL_G(v) (pcntl_globals.v)
79 #endif
80
81 #define REGISTER_PCNTL_ERRNO_CONSTANT(name) REGISTER_LONG_CONSTANT("PCNTL_" #name, name, CONST_CS | CONST_PERSISTENT)
82
83 #endif
84
85
86
87
88
89
90
91
92