diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-05-27 00:46:24 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-05-27 00:46:24 +0000 |
commit | 514182a05fe7aec29f1142aa8aa434d6a0475f26 (patch) | |
tree | a2d6af91fe049b8a9ec811722c899318aad1f558 | |
parent | 8506b4ba33d0472b1e0ba8f11a67c6cb020c1aa8 (diff) | |
download | tinyproxy-514182a05fe7aec29f1142aa8aa434d6a0475f26.tar.gz tinyproxy-514182a05fe7aec29f1142aa8aa434d6a0475f26.zip |
(display_license): Updated the copyright dates
(main): Moved the signals around so that the appropriate signal is assigned to either the children or just the parrent process.
Updated the copyright on the file.
Diffstat (limited to '')
-rw-r--r-- | src/tinyproxy.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tinyproxy.c b/src/tinyproxy.c index d7efafe..5a35d04 100644 --- a/src/tinyproxy.c +++ b/src/tinyproxy.c @@ -1,4 +1,4 @@ -/* $Id: tinyproxy.c,v 1.32 2002-05-26 18:52:23 rjkaes Exp $ +/* $Id: tinyproxy.c,v 1.33 2002-05-27 00:46:24 rjkaes Exp $ * * The initialize routine. Basically sets up all the initial stuff (logfile, * listening socket, config options, etc.) and then sits there and loops @@ -7,9 +7,9 @@ * stats, etc.) Like any good program, most of the work is actually done * elsewhere. * - * Copyright (C) 1998 Steven Young - * Copyright (C) 1999 Robert James Kaes (rjkaes@flarenet.com) - * Copyright (C) 2000 Chris Lightfoot (chris@ex-parrot.com> + * Copyright (C) 1998 Steven Young + * Copyright (C) 1998-2002 Robert James Kaes (rjkaes@flarenet.com) + * Copyright (C) 2000 Chris Lightfoot (chris@ex-parrot.com> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -158,7 +158,7 @@ main(int argc, char **argv) /* * Disable the creation of CORE files right up front. */ -#ifdef HAVE_SETRLIMIT +#if defined(HAVE_SETRLIMIT) && defined(NDEBUG) struct rlimit core_limit = { 0, 0 }; if (setrlimit(RLIMIT_CORE, &core_limit) < 0) { fprintf(stderr, "%s: Could not set the core limit to zero.\n", @@ -305,11 +305,6 @@ main(int argc, char **argv) argv[0]); exit(EX_OSERR); } - if (set_signal_handler(SIGCHLD, takesig) == SIG_ERR) { - fprintf(stderr, "%s: Could not set the \"SIGCHLD\" signal.\n", - argv[0]); - exit(EX_OSERR); - } #ifdef FILTER_ENABLE if (config.filter) @@ -375,9 +370,14 @@ main(int argc, char **argv) } /* - * These signals are only for the main child. + * These signals are only for the parent process. */ log_message(LOG_INFO, "Setting the various signals."); + if (set_signal_handler(SIGCHLD, takesig) == SIG_ERR) { + fprintf(stderr, "%s: Could not set the \"SIGCHLD\" signal.\n", + argv[0]); + exit(EX_OSERR); + } if (set_signal_handler(SIGTERM, takesig) == SIG_ERR) { fprintf(stderr, "%s: Could not set the \"SIGTERM\" signal.\n", argv[0]); |