ZCOM C I/F Library Routines
ZCLOS (3X)
| ZCLOS (3X) |
NAME | zclos - Delete program input ZLU |
SYNOPSIS | |
#include | <zcom/zcomsys.h> |
#include | <zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */ |
int32 | zclos (zap) |
zaddr_type *zap;
DESCRIPTION | Routine zclos closes the program ZLU set up by the zopen call and | |
| returns the ZLU back to the system for reuse. This call should normally | |
| always occur before a program terminates. If the program ZLU is not | |
| closed, then the ZCOM subsystem will continue to hold all of the | |
| resources associated with the ZLU and may add messages to the input | |
| queue. This feature allows a program to open a ZLU on another | |
| program’s behalf, or to be killed and rerun without losing any queued | |
| messages. It is the programmer’s responsibility to ensure that all | |
| unnecessary program ZLUs are closed before the program terminates. | |
| If zclos is called to close a program’s primary ZLU, the program will no | |
| longer have a primary ZLU. Usually, a program should open another | |
| ZLU as the primary ZLU because some APIs may return an error if the | |
| primary ZLU does not exist (e.g. zsend(3X)). | |
| The libraries libzcom_c.a and libpthread.a must be linked into the calling | |
| program by giving the options | |
Threads | This routine may be called from | |
Considerations | POSIX (1003.1c) kernel threads API package. This routine has the | |
| following characteristics when called by a | |
| cancellation point | Thread cancellation can occur when a thread |
|
| calls this routine. |
168 | Chapter 4 |