FTAM/9000 Programmer's Guide
180 Chapter 4
Using Support Functions
Responding to Asynchronous Calls
Using em_hp_select()
#include %</opt/ftam/include/map.h>
Return_code
em_hp_select (timeout, return_event_name, nfds, readfds,
writefds, exceptfds, result)
Em_t timeout;
Local_event_name *return_event_name
int *nfds
unsigned *readfds
unsigned *writefds
unsigned *exceptfds
Api_rc *result;
This section describes how to use em_hp_select() and provides two
program examples. For additional details, refer to the HP FTAM/9000
Reference Manual.
NOTE FTAM events are asynchronous FTAM operations that complete.
Non-FTAM events consist of any type of descriptor supported by the
select(2) system call that becomes readable or writable, or has exceptions
pending.
Multiple asynchronous FTAM functions calls are commonly outstanding
at the same time. An application may also need to interact with other
processes using an interprocess communication mechanism (for instance,
HP-UX Domain Sockets or pipes). It may also require response to
asynchronous events from a terminal keyboard or window system (for
instance, X- Windows).
The MAP 3.0 Event Management interface does not provide an
independent method to wait on both FTAM and non-FTAM events
simultaneously. Therefore, HP added a proprietary
function—em_hp_select()—to provide this capability.
Neither em_wait() nor em_hp_select() automatically return when
interrupted by a signal. However, the following section describes a way to
make a signal generate a non-FTAM event, causing em_hp_select() to
return on receipt of a signal.