PHP Function Proc_Terminate
PHP is a powerful server-side scripting language used to create dynamic web pages. However, if PHP code is written in an insecure manner it can potentially cause damage to your server or web hosting account data. For this reason RunCloud disables many native PHP functions by default. If you require access to these functions please open a support ticket and we will evaluate your request.
PHP function proc_terminate (pronounced pro-c-terminate) signals a process opened using proc_open() to terminate and return its exit status. In addition it closes any pipes to that process, in order to avoid a deadlock if the child exits while the pipes are still open.
The process_pid argument specifies the ID of the process whose termination you want to signal. The other_options argument is an indexed array, where the key represents the file descriptor number and the value indicates how to pass that handle to the child process. Valid values include 'r' to pass the read end of the pipe, 'w' to pass the write end, or 'other' to set a custom value for passing that file descriptor.
If you use 'other' as the value for your pipe, you must also escape any user-supplied input or output with escapeshellarg() or escapeshellcmd(). Otherwise, a malicious user could trick PHP into executing arbitrary commands on your server.
In Windows, the descriptors 0, 1 and 2 (stdin, stdout and stderr) are passed to the process via a standard uni-directional process pipe. For better Windows compatibility you can use the popen() function instead.