hi,all.I use libmemcached in my c++ program.I set SIGPIPE signal's handler as follow: //SIGPIPE static void handle_pipe(int sig) { Logger::log_msg(LOG_WARN,"received a SIGPIPE signal,in file %s time %s \n",__FILE__,__TIME__); } static void set_pipe() { struct sigaction action; action.sa_handler = handle_pipe; sigemptyset(&action.sa_mask); action.sa_flags = 0; sigaction(SIGPIPE,&action,NULL); }
void set_signal() { set_pipe(); } But,SOMEYIMES,my program may still receive this signal.I am very confused .