[Prev] [Contents] [Next]
Initial thread is special, cannot pthread_exit()
The initial thread in an OS/400 process is special. It has these characteristics.
- If the initial thread calls pthread_exit() the process will terminate
- If the initial thread is the target of a pthread_cancel() request that is acted upon, the process will terminate.
- If the initial thread terminates through any other action, the process will terminate.
- Many OS/400 APIs and commands are defined to operate against a process. Some of those APIs target thread scoped resources for retrieval or modification. If this is the case, the resources that will be displayed, modified or retrieved may be the resources owned by the initial thread. For example, the CL command WRKACTJOB allows you to display information like the call stack for a job. Since a job doesn't have a call stack, and the call stack is thread scoped, the call stack displayed when you choose to display the call stack of a job is that of the initial thread. Other APIs or CL commands that operate against jobs have undergone similar changes. See the specific documentation for the API or CL command of concern.
[Prev] [Contents] [Next]
Copyright © 1998, IBM Corporation. All rights
reserved.
Comments? Contact rchthrds@us.ibm.com