Adic Server Manual de usuario Pagina 193

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 218
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 192
Response Technique 5-21
21 Dec 2001
Response Technique
This section describes the most desirable response processing
technique.
Setup
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.
Figure 5-21 Setup Signal Handler
. . .
/* 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 );
}
. . .
Vista de pagina 192
1 2 ... 188 189 190 191 192 193 194 195 196 197 198 ... 217 218

Comentarios a estos manuales

Sin comentarios