HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)
Writing CPI-C Applications
HP-UX Considerations
Chapter 298
The following restrictions apply to SIGPOLL() usage:
• Applications must not permanently disable this signal. The
sighold() and sigrelse() signal calls can be used to protect a
critical region of code, provided that no SNA verbs are issued
between sighold() and sigrelse().
• Applications must preserve the address of the SNAplus2 signal
catchers returned by the sigset() call when adding signal catchers
to applications. Applications must then arrange to call these routines
from within the new signal catchers.
• Applications must not use the POSIX signal mechanism SIGACTN(),
which can cause problems in SNAplus2 applications.
• The HP-UX operating system call sleep() can cause problems if
applications or their libraries also use signal catchers. Because the
SNAplus2 CPI-C library operates using a signal catcher, do not use
the sleep() call within an CPI-C application that uses signal-based
scheduling. If necessary, you can use the alarm() with a timer to
provide the same function.
Multithreaded Applications
SNAplus2 API libraries are available for linking with multithreaded
applications. When you develop applications to operate in a
multithreaded environment, the following restrictions apply:
The application must perform any required cleanup processing before a
thread terminates. The CPI-C library does not maintain any correlation
between threads and CPI-C verb usage and does not perform this
processing automatically when a thread terminates.
For the HP-UX 10.20 operating system, kernel threads are not
supported.
Multiple Processes
If the process that started the conversation forks to create a child
process, the child process cannot use the conversation_ID that was
returned to the parent process. It can, however, issue its own
Initialize_Conversation, Initialize_For_Incoming, or
Accept_Conversation call to obtain its own conversation_ID.