From a9fe364acccbf12180b45d02b26bf92520aaf17c Mon Sep 17 00:00:00 2001 From: sageweil Date: Sun, 2 Dec 2007 22:08:33 +0000 Subject: [PATCH] mask SIGPIPE in a kludgey way.. bleh git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2171 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/msg/SimpleMessenger.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/trunk/ceph/msg/SimpleMessenger.cc b/trunk/ceph/msg/SimpleMessenger.cc index c1ab2ee8346fc..45f5b404b9aff 100644 --- a/trunk/ceph/msg/SimpleMessenger.cc +++ b/trunk/ceph/msg/SimpleMessenger.cc @@ -179,6 +179,7 @@ int Rank::Accepter::start() sa.sa_flags = 0; sigemptyset(&sa.sa_mask); sigaction(SIGUSR1, &sa, NULL); + sigaction(SIGPIPE, &sa, NULL); // mask SIGPIPE too. FIXME: i'm quite certain this is a roundabout way to do that. // start thread create(); @@ -237,6 +238,7 @@ void *Rank::Accepter::entry() void Rank::Accepter::stop() { done = true; + dout(10) << "stop sending SIGUSR1" << dendl; this->kill(SIGUSR1); join(); } @@ -267,6 +269,7 @@ void Rank::reaper() p->join(); dout(10) << "reaper reaped pipe " << p << " " << p->get_peer_addr() << dendl; delete p; + dout(10) << "reaper deleted pipe " << p << dendl; } } @@ -1153,7 +1156,7 @@ void Rank::Pipe::reader() lock.Unlock(); if (reap) { - dout(20) << "reader queueing for reap" << dendl; + dout(10) << "reader queueing for reap" << dendl; if (sd > 0) ::close(sd); rank.lock.Lock(); { @@ -1254,7 +1257,7 @@ void Rank::Pipe::writer() lock.Unlock(); if (reap) { - dout(20) << "writer queueing for reap" << dendl; + dout(10) << "writer queueing for reap" << dendl; if (sd > 0) ::close(sd); rank.lock.Lock(); { -- 2.39.5