From: Jonathan McDowell Date: Thu, 31 Mar 2011 17:57:41 +0000 (-0700) Subject: Ignore SIGPIPE in keyd X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/commitdiff_plain/f9917d386685c7f641d493dbc78eb3eb41fb24bd?ds=sidebyside Ignore SIGPIPE in keyd catchsignals() normally catches SIGPIPE and sets the cleanup flag, as per the other signals it catches. This is fine for the HKP CGI, but not appropriate for keyd (as it's probably because the client has exited without doing appropriate cleanup). Ignore it; we'll deal with the error when we try to read/write to the socket. --- diff --git a/keyd.c b/keyd.c index 919b61b..ccc4750 100644 --- a/keyd.c +++ b/keyd.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -406,7 +407,8 @@ int main(int argc, char *argv[]) } catchsignals(); - + signal(SIGPIPE, SIG_IGN); + snprintf(sockname, 1023, "%s/%s", config.db_dir, KEYD_SOCKET); fd = sock_init(sockname);