GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
spawnlp(3) FreeBSD Library Functions Manual spawnlp(3)

#include <xtend/proc.h>
-lxtend

int     spawnlp(int parent_action, int echo,
char *infile, char *outfile, char *errfile,
char *arg0, ...)

parent_action:  P_WAIT or P_NOWAIT
echo:           P_ECHO or P_NOECHO
infile:         File to which stdin of child is redirected or NULL
outfile:        File to which stdout of child is redirected or NULL
errfile:        File to which stderr of child is redirected or NULL

spawnvp() and spawnlp() are wrappers around fork(2) and exec(3) which make it easy to run a child process without an intermediate shell process as is used by system(3). The spawnlp() function spawns a child process using a variable argument list. The 6th argument is passed to argv[0] of the child, the 7th to argv[1], etc.

The spawnvp() function spawns a process using the command contained in an argv[] array constructed by the caller. spawnlp() automatically constructs such an argv[] array and calls spawnvp().

The calling process waits for the child to complete if P_WAIT is passed to parent_action, or continues immediately if P_NOWAIT is passed. If P_ECHO is passed as the echo argument, the command is echoed, the command is echoed to the parent's stdout.

If infile, outfile, or errfile are not NULL, then the corresponding file streams stdin, stdout, or stderr are redirected to the filename provided.

The exit status of the child process if P_WAIT is passed The PID of the child process if P_NOWAIT is passed

spawnvp(3), fork(2), exec(3)


Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.