qnx_spawn_process

qnx_spawn_process --  is an implementation of the C function qnx_spawn.

Syntax

qnx_spawn_process (exec, node, priority, scheduler,
flags, program, arg_list, file_list, ctfile)

		

Arguments

exec

If non-nil, then exec the process, otherwise spawn a separate task.

node

The node on which to spawn, or zero for the current node.

priority

The scheduler priority of the new task.

scheduler

the scheduler algorithm for the new task.

flags

The spawn flags.

program

The program name.

arg_list

Arguments to the program, as a list, excluding the program name.

file_list

A list of up to 10 files to be associated with the first 10 file descriptors of the new process. If any element in the list is a non-file, then use the corresponding file descriptor in the current process. A nil file-list indicates that all 10 file descriptors will be inherited from the calling task.

ctfile

A file associated with the controlling terminal for the new process.

Returns

The task ID of the new task, or -1 if an error occurs, and the errno is set.

Description

This is an implementation of the qnx_spawn C function. It is currently only available in QNX 4. This is the lowest level function for creating a new process.

Passing -1 to the priority option will cause the new task to inherit its priority from the parent, otherwise a value from 1-31 is acceptable.

Passing -1 to the scheduler option will cause the new task to inherit its scheduler activities from the parent, otherwise the following flags are defined for the scheduler option:

The following spawn flags are defined for the flags option:

The library "const/QNXOS" should be required to use these constants

Errors that can happen when using this function:

The ctfile is a file descriptor associated with the new process. This parameter is only meaningful if the _SPAWN_SETID flag is set. If you wish to start a new session without a controlling terminal then pass -1.

Example

Examples of this function are beyond the scope of this documentation.

See Also

exec, fork, wait

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.