diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-09-02 05:00:47 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-09-02 05:00:47 +0000 |
commit | 72c383f4b7bcce5374632dc972df16ab0e2542b9 (patch) | |
tree | 8d1d4b815e7ba08faea4b2eeddd3b39ecc5bc842 /source/smbd/server.c | |
parent | f297662d64da9423e3d2efc6c602e40613c4236e (diff) | |
download | samba-72c383f4b7bcce5374632dc972df16ab0e2542b9.tar.gz samba-72c383f4b7bcce5374632dc972df16ab0e2542b9.tar.xz samba-72c383f4b7bcce5374632dc972df16ab0e2542b9.zip |
we are never interested in SIGPIPE so just ignore (block) it
always. Don't even install a handler.
Diffstat (limited to 'source/smbd/server.c')
-rw-r--r-- | source/smbd/server.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c index 1bc6cf273f0..dadf2018c8e 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -67,25 +67,6 @@ void killkids(void) } - -/**************************************************************************** - this is called when the client exits abruptly - **************************************************************************/ -static void sig_pipe(int sig) -{ - struct cli_state *cli; - BlockSignals(True,SIGPIPE); - - if ((cli = server_client()) && cli->initialised) { - DEBUG(3,("lost connection to password server\n")); - cli_shutdown(cli); - BlockSignals(False,SIGPIPE); - return; - } - - exit_server("Got sigpipe\n"); -} - /**************************************************************************** open the socket communication ****************************************************************************/ @@ -96,7 +77,6 @@ static BOOL open_sockets_inetd(void) /* Started from inetd. fd 0 is the socket. */ /* We will abort gracefully when the client or remote system goes away */ - CatchSignal(SIGPIPE, SIGNAL_CAST sig_pipe); Client = dup(0); /* close our standard file descriptors */ @@ -244,9 +224,6 @@ max can be %d\n", if (Client != -1 && fork()==0) { /* Child code ... */ - CatchSignal(SIGPIPE, - SIGNAL_CAST sig_pipe); - /* close the listening socket(s) */ for(i = 0; i < num_interfaces; i++) close(fd_listenset[i]); @@ -552,6 +529,9 @@ static void usage(char *pname) fault_setup((void (*)(void *))exit_server); CatchSignal(SIGTERM , SIGNAL_CAST dflt_sig); + /* we are never interested in SIGPIPE */ + BlockSignals(True,SIGPIPE); + /* we want total control over the permissions on created files, so set our umask to 0 */ umask(0); |