9.7. Process Control
The process control functions wrap UNIX functions for signal handling. They are appropriate for PHP CLI executable running on a UNIX operating system only. Signals are beyond the scope of this text but are a common topic in any relatively in-depth text on UNIX programming.
integer pcntl_alarm(integer seconds)
The pcntl_alarm function sets up a SIGALRM signal after the given number of seconds. The operating system discards any previous alarm and returns the number of seconds left on it.
boolean pcntl_exec(string path, array arguments, array environment)
The pcntl_exec function (Listing 9.99) executes a program. Set the optional arguments array with any number of arguments to pass on the command line. Set the environment argument ...
Get Core PHP Programming, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.