Chapter Contents |
Previous |
Next |
oetaskctl |
Portability: | SAS/C extension |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
USAGE NOTES | |
SEE ALSO |
SYNOPSIS |
#include <lclib.h> int oetaskctl(int setting);
DESCRIPTION |
The
oetaskctl
function is used to
control the interpretation of OS/390 subtasks of the current program, such
as subtasks created by the system or
oslink
functions, or by the assembler
ATTACH
macro. By default, subtasks of a program which has used UNIX
System Services facilities are treated as threads. This means
that UNIX System Services resources, such as file descriptors, current directory,
and signal handlers, are shared between the subtasks. Because the SAS/C library
assumes that these resources are not shared, this mode of operation can lead
to errors.
Alternately,
oetaskctl
can be used to indicate that subtasks of the calling program are to be treated
as a separate process from the calling program. This implies each subtask
will have its own set of file descriptors, its own current directory, and
its own signal handling. This is generally recommended when both tasks are
SAS/C programs.
The
setting
argument
to
oetaskctl
specifies
whether a new subtask should be treated as a thread or a process. An argument
of
0
specifies a thread,
and
1
specifies a process.
Note: The thread or process decision is made when the subtask
calls the first UNIX System Services function, not when the subtask is
ATTACH
ed.
RETURN VALUE |
oetaskctl
returns the previous
oetaskctl
setting if successful. It returns
-1
if it was unable to complete successfully.
USAGE NOTES |
oetaskctl
is useful only if both the calling task and the subtask use UNIX System
Services facilities.
SEE ALSO |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.