UnixStudier
unread,Dec 26, 2008, 5:39:08 AM12/26/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to memcached
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 .