HP-UX Event ManagerProgrammer's Guide
it has finished with the event. */
EvmEventDestroy(cbdata->event);
break;
/* Because we made a subscription request earlier, the function will also be invoked with a callback reason
of EvmREASON_SUBSCRIBE_COMiPLETE. In this example, all the reason codes can be ignored.*/
default: break; }}
Handling Multiple I/O Sources
You must not use EvmEventWait()to write a program that perform functions other than
listening for events. For example, you may want to use the select system call to wait for I/O
activity on multiple file descriptors, including the EVM connection.
Example 4-7 illustrates how to handle the EVM connection in conjunction with the input from
stdin.
Example 4-7 introduces the following functions:
• EvmConnFdGet — Returns the file descriptor (file number) associated with a specified
connection. For more information about this function, see EvmConnFdGet(3).
• EvmConnCheck — Checks whether any I/O activity is outstanding on a specified connection.
For more information about this function, see EvmConnCheck(3).
Handling Multiple I/O Sources 47