php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
pcntl.c File Reference
#include "php.h"
#include "ext/standard/info.h"
#include "php_signal.h"
#include "php_ticks.h"
#include "zend_fibers.h"
#include "php_pcntl.h"
#include <errno.h>
#include "Zend/zend_enum.h"
#include "Zend/zend_max_execution_timer.h"
#include "pcntl_arginfo.h"

Go to the source code of this file.

Macros

#define PCNTL_DEBUG   0
 
#define IF_DEBUG(z)
 
#define NSIG   32
 
#define LONG_CONST(c)
 
#define PHP_RUSAGE_PARA(from, to, field)
 
#define PHP_RUSAGE_SPECIAL(from, to)
 
#define PHP_RUSAGE_COMMON(from, to)
 
#define PHP_RUSAGE_TO_ARRAY(from, to)
 

Functions

 PHP_RINIT_FUNCTION (pcntl)
 
 PHP_MINIT_FUNCTION (pcntl)
 
 PHP_MSHUTDOWN_FUNCTION (pcntl)
 
 PHP_RSHUTDOWN_FUNCTION (pcntl)
 
 PHP_MINFO_FUNCTION (pcntl)
 
 PHP_FUNCTION (pcntl_fork)
 
 PHP_FUNCTION (pcntl_alarm)
 
 PHP_FUNCTION (pcntl_waitpid)
 
 PHP_FUNCTION (pcntl_wait)
 
 PHP_FUNCTION (pcntl_wifexited)
 
 PHP_FUNCTION (pcntl_wifstopped)
 
 PHP_FUNCTION (pcntl_wifsignaled)
 
 PHP_FUNCTION (pcntl_wifcontinued)
 
 PHP_FUNCTION (pcntl_wexitstatus)
 
 PHP_FUNCTION (pcntl_wtermsig)
 
 PHP_FUNCTION (pcntl_wstopsig)
 
 PHP_FUNCTION (pcntl_exec)
 
 PHP_FUNCTION (pcntl_signal)
 
 PHP_FUNCTION (pcntl_signal_get_handler)
 
 PHP_FUNCTION (pcntl_signal_dispatch)
 
 PHP_FUNCTION (pcntl_get_last_error)
 
 PHP_FUNCTION (pcntl_strerror)
 
 PHP_FUNCTION (pcntl_async_signals)
 

Variables

zend_module_entry pcntl_module_entry
 

Macro Definition Documentation

◆ IF_DEBUG

#define IF_DEBUG ( z)

Definition at line 23 of file pcntl.c.

◆ LONG_CONST

#define LONG_CONST ( c)
Value:
int32_t zend_long
Definition zend_long.h:42

Definition at line 140 of file pcntl.c.

◆ NSIG

#define NSIG   32

Definition at line 137 of file pcntl.c.

◆ PCNTL_DEBUG

#define PCNTL_DEBUG   0

Definition at line 17 of file pcntl.c.

◆ PHP_RUSAGE_COMMON

#define PHP_RUSAGE_COMMON ( from,
to )
Value:
PHP_RUSAGE_PARA(from, to, ru_utime.tv_usec); \
PHP_RUSAGE_PARA(from, to, ru_utime.tv_sec); \
PHP_RUSAGE_PARA(from, to, ru_stime.tv_usec); \
PHP_RUSAGE_PARA(from, to, ru_stime.tv_sec);
#define PHP_RUSAGE_PARA(from, to, field)
Definition pcntl.c:315

Definition at line 336 of file pcntl.c.

◆ PHP_RUSAGE_PARA

#define PHP_RUSAGE_PARA ( from,
to,
field )
Value:
add_assoc_long(to, #field, from.field)

Definition at line 315 of file pcntl.c.

◆ PHP_RUSAGE_SPECIAL

#define PHP_RUSAGE_SPECIAL ( from,
to )
Value:
PHP_RUSAGE_PARA(from, to, ru_oublock); \
PHP_RUSAGE_PARA(from, to, ru_inblock); \
PHP_RUSAGE_PARA(from, to, ru_msgsnd); \
PHP_RUSAGE_PARA(from, to, ru_msgrcv); \
PHP_RUSAGE_PARA(from, to, ru_maxrss); \
PHP_RUSAGE_PARA(from, to, ru_ixrss); \
PHP_RUSAGE_PARA(from, to, ru_idrss); \
PHP_RUSAGE_PARA(from, to, ru_minflt); \
PHP_RUSAGE_PARA(from, to, ru_majflt); \
PHP_RUSAGE_PARA(from, to, ru_nsignals); \
PHP_RUSAGE_PARA(from, to, ru_nvcsw); \
PHP_RUSAGE_PARA(from, to, ru_nivcsw); \
PHP_RUSAGE_PARA(from, to, ru_nswap);

Definition at line 318 of file pcntl.c.

◆ PHP_RUSAGE_TO_ARRAY

#define PHP_RUSAGE_TO_ARRAY ( from,
to )
Value:
if (to) { \
PHP_RUSAGE_SPECIAL(from, to) \
PHP_RUSAGE_COMMON(from, to); \
}

Definition at line 342 of file pcntl.c.

Function Documentation

◆ PHP_FUNCTION() [1/18]

PHP_FUNCTION ( pcntl_alarm )

Definition at line 303 of file pcntl.c.

◆ PHP_FUNCTION() [2/18]

PHP_FUNCTION ( pcntl_async_signals )

Definition at line 1394 of file pcntl.c.

◆ PHP_FUNCTION() [3/18]

PHP_FUNCTION ( pcntl_exec )

Definition at line 626 of file pcntl.c.

◆ PHP_FUNCTION() [4/18]

PHP_FUNCTION ( pcntl_fork )

Definition at line 265 of file pcntl.c.

◆ PHP_FUNCTION() [5/18]

PHP_FUNCTION ( pcntl_get_last_error )

Definition at line 1261 of file pcntl.c.

◆ PHP_FUNCTION() [6/18]

PHP_FUNCTION ( pcntl_signal )

Definition at line 736 of file pcntl.c.

◆ PHP_FUNCTION() [7/18]

PHP_FUNCTION ( pcntl_signal_dispatch )

Definition at line 846 of file pcntl.c.

◆ PHP_FUNCTION() [8/18]

PHP_FUNCTION ( pcntl_signal_get_handler )

Definition at line 815 of file pcntl.c.

◆ PHP_FUNCTION() [9/18]

PHP_FUNCTION ( pcntl_strerror )

Definition at line 1270 of file pcntl.c.

◆ PHP_FUNCTION() [10/18]

PHP_FUNCTION ( pcntl_wait )

Definition at line 435 of file pcntl.c.

◆ PHP_FUNCTION() [11/18]

PHP_FUNCTION ( pcntl_waitpid )

Definition at line 349 of file pcntl.c.

◆ PHP_FUNCTION() [12/18]

PHP_FUNCTION ( pcntl_wexitstatus )

Definition at line 572 of file pcntl.c.

◆ PHP_FUNCTION() [13/18]

PHP_FUNCTION ( pcntl_wifcontinued )

Definition at line 552 of file pcntl.c.

◆ PHP_FUNCTION() [14/18]

PHP_FUNCTION ( pcntl_wifexited )

Definition at line 492 of file pcntl.c.

◆ PHP_FUNCTION() [15/18]

PHP_FUNCTION ( pcntl_wifsignaled )

Definition at line 532 of file pcntl.c.

◆ PHP_FUNCTION() [16/18]

PHP_FUNCTION ( pcntl_wifstopped )

Definition at line 512 of file pcntl.c.

◆ PHP_FUNCTION() [17/18]

PHP_FUNCTION ( pcntl_wstopsig )

Definition at line 608 of file pcntl.c.

◆ PHP_FUNCTION() [18/18]

PHP_FUNCTION ( pcntl_wtermsig )

Definition at line 590 of file pcntl.c.

◆ PHP_MINFO_FUNCTION()

PHP_MINFO_FUNCTION ( pcntl )

Definition at line 257 of file pcntl.c.

◆ PHP_MINIT_FUNCTION()

PHP_MINIT_FUNCTION ( pcntl )

Definition at line 213 of file pcntl.c.

◆ PHP_MSHUTDOWN_FUNCTION()

PHP_MSHUTDOWN_FUNCTION ( pcntl )

Definition at line 223 of file pcntl.c.

◆ PHP_RINIT_FUNCTION()

PHP_RINIT_FUNCTION ( pcntl )

Definition at line 195 of file pcntl.c.

◆ PHP_RSHUTDOWN_FUNCTION()

PHP_RSHUTDOWN_FUNCTION ( pcntl )

Definition at line 228 of file pcntl.c.

Variable Documentation

◆ pcntl_module_entry

zend_module_entry pcntl_module_entry
Initial value:
= {
"pcntl",
ext_functions,
PHP_MINIT(pcntl),
PHP_MSHUTDOWN(pcntl),
PHP_RINIT(pcntl),
PHP_RSHUTDOWN(pcntl),
PHP_MINFO(pcntl),
PHP_GINIT(pcntl),
}
#define NULL
Definition gdcache.h:45
#define PHP_GINIT
Definition php.h:397
#define PHP_MINFO
Definition php.h:396
#define PHP_RINIT
Definition php.h:394
#define PHP_MSHUTDOWN
Definition php.h:393
#define PHP_RSHUTDOWN
Definition php.h:395
#define PHP_MINIT
Definition php.h:392
#define PHP_MODULE_GLOBALS
Definition php.h:408
#define PHP_PCNTL_VERSION
Definition php_pcntl.h:28
#define STANDARD_MODULE_HEADER
#define STANDARD_MODULE_PROPERTIES_EX

Definition at line 151 of file pcntl.c.