FACT++  1.0
void ignore_sigpipe ( )

Definition at line 356 of file dim_thr.c.

References pipe_sig_handler().

Referenced by dim_init().

357 {
358 
359  struct sigaction sig_info;
360  sigset_t set;
361  void pipe_sig_handler();
362 
363  if( sigaction(SIGPIPE, 0, &sig_info) < 0 )
364  {
365  perror( "sigaction(SIGPIPE)" );
366  exit(1);
367  }
368  if(sig_info.sa_handler)
369  {
370 /*
371  printf("DIM ignore_sigpipe() - Handler already defined %08X\n", sig_info.sa_handler);
372 */
373  return;
374  }
375  sigemptyset(&set);
376  sig_info.sa_handler = pipe_sig_handler;
377  sig_info.sa_mask = set;
378 #ifndef LYNXOS
379  sig_info.sa_flags = SA_RESTART;
380 #else
381  sig_info.sa_flags = 0;
382 #endif
383 
384  if( sigaction(SIGPIPE, &sig_info, 0) < 0 )
385  {
386  perror( "sigaction(SIGPIPE)" );
387  exit(1);
388  }
389 }
void pipe_sig_handler(int num)
Definition: dim_thr.c:391

+ Here is the call graph for this function:

+ Here is the caller graph for this function: