From: hno <> Date: Fri, 27 May 2005 13:18:08 +0000 (+0000) Subject: Run helpers in the same process group as the main process but instead X-Git-Tag: SQUID_3_0_PRE4~740 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b6888743c44cb1703273e1a66ed84d6cd0797e8;p=thirdparty%2Fsquid.git Run helpers in the same process group as the main process but instead disable SIGINT for the helpers when not running in daemon mode. This accomplishes several things a) The helpers may access /dev/tty for screen output (debug purposes) b) A "kill -9" can be sent to the whole process group at once. --- diff --git a/src/ipc.cc b/src/ipc.cc index 80208358b6..415c90204b 100644 --- a/src/ipc.cc +++ b/src/ipc.cc @@ -1,6 +1,6 @@ /* - * $Id: ipc.cc,v 1.39 2004/12/20 16:30:35 robertc Exp $ + * $Id: ipc.cc,v 1.40 2005/05/27 07:18:08 hno Exp $ * * DEBUG: section 54 Interprocess Communication * AUTHOR: Duane Wessels @@ -377,11 +377,8 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name for (x = 3; x < SQUID_MAXFD; x++) close(x); -#if HAVE_SETSID - - setsid(); - -#endif + if (opt_no_daemon) + squid_signal(SIGINT, SIG_IGN, SA_RESETHAND); execvp(prog, (char *const *) args);