a structure of default values to be sent to qnx_spawn
#include <sys/types.h> #include <sys/qnx_glob.h> struct _qnx_spawn_globs { struct _proc_spawn *msgbuf; nid_t node; char priority; char sched_algo; short int flags; char iov[10]; char ctfd; char reserved1; short int reserved2[5]; } qnx_spawn_options;
This global structure sets the default values to be passed to qnx_spawn() when any of the spawn...() and exec...() functions are called. For information on these options, see the qnx_spawn() function. It's initialized to the following values:
struct _qnx_spawn_globs qnx_spawn_options = { NULL, 0L, -1, -1, 0, { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, 0xff, 0, { 0 } };
These default values, passed as parameters to qnx_spawn(), cause it to behave as follows:
#include <unistd.h> /* for spawnlp() */ #include <sys/types.h> #include <sys/qnx_glob.h> int main( void ) { /* Set priority */ qnx_spawn_options.priority = 20; /* Do the spawn */ pid = spawnlp( 1, "my_cmd", "arg", NULL ); /* Reset default */ qnx_spawn_options.priority = -1; exit (EXIT_SUCCESS); }
QNX
errno, exec... functions, fork(), qnx_spawn(), spawn... functions, wait(), waitpid()