Adic Server Manuel d'utilisateur Page 193

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 218
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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 );
}
. . .
Vue de la page 192
1 2 ... 188 189 190 191 192 193 194 195 196 197 198 ... 217 218

Commentaires sur ces manuels

Pas de commentaire