359 struct sigaction sig_info;
363 if( sigaction(SIGPIPE, 0, &sig_info) < 0 )
365 perror(
"sigaction(SIGPIPE)" );
368 if(sig_info.sa_handler)
377 sig_info.sa_mask =
set;
379 sig_info.sa_flags = SA_RESTART;
381 sig_info.sa_flags = 0;
384 if( sigaction(SIGPIPE, &sig_info, 0) < 0 )
386 perror(
"sigaction(SIGPIPE)" );
void pipe_sig_handler(int num)