Response Technique; Setup - ADIC Server User Manual

Adic server user manual
Table of Contents

Advertisement

Response Technique

Setup

. . .
/* dasadmin sample application, dasadmin.c file */
int
( *func )();
struct sigaction action;
aci_async_entry *async_entry;
action.sa_handler = wait_for_child;
sigemptyset(&action.sa_mask);
action.sa_flags = 0;
if (sigaction(SIGCHLD, &action, (struct sigaction*)0)
== (int)SIG_ERR)
{
fprintf( stderr, "Unable to set signal handler for
SIGCHLD\n");
return( 1 );
}
. . .
Figure 5-21
21 Dec 2001
This section describes the most desirable response processing
technique.
The following code should be executed upon startup. This
code installs a signal handler, which will be automatically run
every time one of the child processes terminates. At this point
retrieve the results, place them into internal data structures
and free the shared memory array entry. See Figure 5-21.
Setup Signal Handler
Response Technique
5-21

Advertisement

Table of Contents
loading

Table of Contents