php man page for pclose

Query: pclose

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

PCLOSE(3)								 1								 PCLOSE(3)

pclose - Closes process file pointer

SYNOPSIS
int pclose (resource $handle)
DESCRIPTION
Closes a file pointer to a pipe opened by popen(3).
PARAMETERS
o $handle - The file pointer must be valid, and must have been returned by a successful call to popen(3).
RETURN VALUES
Returns the termination status of the process that was run. In case of an error then -1 is returned.
EXAMPLES
Example #1 pclose(3) example <?php $handle = popen('/bin/ls', 'r'); pclose($handle); ?>
NOTES
Note Unix Only: pclose(3) is internally implemented using the waitpid(3) system call. To obtain the real exit status code the pcntl_wexitstatus(3) function should be used.
SEE ALSO
popen(3). PHP Documentation Group PCLOSE(3)
Related Man Pages
pclose(3) - mojave
popen(3) - mojave
pclose(3) - redhat
pclose(3) - netbsd
popen(3) - netbsd
Similar Topics in the Unix Linux Community
pclose returning -1
popen and pclose solved
how exactly does pclose work in C?