Chapter Contents

Previous

Next
spawnp

spawnp



Spawn a New Process

Portability: POSIX.1 conforming


SYNOPSIS
DESCRIPTION
RETURN VALUE
USAGE NOTES
RELATED FUNCTIONS


SYNOPSIS

#include <spawn.h>
pid_t spawnp(const char *file, 
             int count, 
             const int fd_map[], 
             struct inheritance *inh, 
             const char *argv[], 
             const char *envp[]);


DESCRIPTION

The spawnp function creates a new process to run an executable program in the hierarchical file system. It performs the same functions as the spawn function, except the path portion of the filename is optional.

The file argument to spawnp is the name of the HFS file to be executed. If the name includes path information, then the file is invoked exactly as specified. If no path information is specified, a search is made of the directories specified by the PATH environment variable (as specified by the envp argument) until an executable file of the specified name is located.

All other arguments to spawnp are interpreted exactly like the corresponding argument to spawn .


RETURN VALUE

If successful, spawnp returns the process id of the new process. If unsuccessful, spawnp returns -1 .


USAGE NOTES

The spawnp function can only be used with MVS 5.2.2 or a later release.


RELATED FUNCTIONS

execve , fork , oeattache , spawn


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.