QlgSpawnp()--Spawn Process with Path (using NLS-enabled file name)
Syntax
#include <spawn.h> #include <qlg.h> pid_t QlgSpawnp(const Qlg_Path_Name_T *file, const int fd_count, const int fd_map[], const struct inheritance *inherit, char * const argv[], char * const envp[]);
Service Program Name: QP0ZSPWN
Default Public Authority: *USE
Threadsafe: Conditional; see Usage Notes.
The QlgSpawnp() function, like the spawnp() function, creates a child process that inherits specific attributes from the parent. The difference is that for the file parameter, the QlgSpawnp() function takes a pointer to a Qlg_Path_Name_T structure, while the spawnp() function takes a pointer to a character string in the ccsid of the job.
Limited information about the file parameter is provided here. For more information about the file parameter and for a discussion of other parameters, authorities required, and return values, see spawnp()--Spawn Process with Path.
Parameters
- file
- (Input) A pointer to a Qlg_Path_Name_T structure that contains a file name or a pointer to a file name that is used with the search path to find an executable file that will run in the new (child) process. For more information on the Qlg_Path_Name_T structure, see Path name format.
Usage Notes
See spawnp()--Spawn Process with Path for a complete discussion of usage information for QlgSpawnp(). In addition, the following should be noted specifically for QlgSpawnp().
- The PATH environment variable is
used; however, the PATH environment variable cannot be a Qlg_Path_Name_T
structure.
- Shell scripts are supported; however, the interpreter path in the shell script itself cannot be a Qlg_Path_Name_T structure.
Related Information
- The <qlg.h> file (see Header
Files for UNIX®-Type Functions)
- spawnp()--Spawn Process with Path
- QlgSpawn()--Spawn Process (using NLS-enabled path name)
Note: All of the related information for spawnp() applies to QlgSpawn().
Example
For an example of using this function, see the example in the QlgSpawn--Spawn Process (using NLS-enabled path name) API.
API introduced: V5R1