Manual Reference Pages - PRIV_POPEN (3)
priv_popen, priv_pclose - process IO
FILE *priv_popen(const char *command, const char * type, const char *user,);
int priv_pclose(FILE *stream);
function opens a process by creating a pipe, forking, and invoking the shell.
type argument may specify only reading or writing, not both. The resulting stream
is correspondingly read-only or write-only.
command argument is a pointer to a null-terminated string containing a shell command
line. The command is bassed to
/bin/sh using the -c flag; interpretation, if any, is performed by the shell. The
mode argument is a pointer to a null-terminated string which must be either
r for reading or w for writing.
See the man page for
for more details, as this method parallels popen(3).
priv_pclose function waits for the associated process to terminate, and returns
the exit status of the command as returned by
On success, a pointer to a valid stream is returned. On error, NULL is
errno is set appropriately.
priv_pclose function returns -1 if
wait4 returns an error, or some other error is detected.
for more detail. In addition to the errors listed there,
priv_popen may set
EPERM if the user is not listed in an run_as configuration directive, or if
the allow_as configuration primitive is not set to true. See
for more details.
The applications configuration file. See
The file must
Network Associates. Send email to <email@example.com>
|Unix ||PRIV_POPEN (3) ||SEPTEMBER 2002 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.