O'Reilly logo

Core PHP Programming, Third Edition by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required