Don't exit after receiving the second SIGHUP on Solaris.
[privoxy.git] / jcc.c
diff --git a/jcc.c b/jcc.c
index e902e19..adaaa9d 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.102 2006/09/06 13:03:04 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.104 2006/09/23 13:26:38 roro Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -33,6 +33,12 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.102 2006/09/06 13:03:04 fabiankeil Exp $"
  *
  * Revisions   :
  *    $Log: jcc.c,v $
+ *    Revision 1.104  2006/09/23 13:26:38  roro
+ *    Replace TABs by spaces in source code.
+ *
+ *    Revision 1.103  2006/09/21 12:54:43  fabiankeil
+ *    Fix +redirect{}. Didn't work with -fast-redirects.
+ *
  *    Revision 1.102  2006/09/06 13:03:04  fabiankeil
  *    Respond with 400 and a short text message
  *    if the client tries to use Privoxy as FTP proxy.
@@ -1291,7 +1297,7 @@ static void chat(struct client_state *csp)
    while ( (csp->sfd = forwarded_connect(fwd, http, csp))
          && (errno == EINVAL) && (forwarded_connect_retries++ < max_forwarded_connect_retries))
    {
-               log_error(LOG_LEVEL_ERROR, "failed request #%u to connect to %s. Trying again.",
+      log_error(LOG_LEVEL_ERROR, "failed request #%u to connect to %s. Trying again.",
                 forwarded_connect_retries, http->hostport);
    }
 
@@ -2099,7 +2105,11 @@ int main(int argc, const char *argv[])
 
    for (idx = 0; catched_signals[idx] != 0; idx++)
    {
+#ifdef sun /* FIXME: Is it safe to check for HAVE_SIGSET instead? */ 
+      if (sigset(catched_signals[idx], sig_handler) == SIG_ERR)
+#else
       if (signal(catched_signals[idx], sig_handler) == SIG_ERR)
+#endif /* ifdef sun */
       {
          log_error(LOG_LEVEL_FATAL, "Can't set signal-handler for signal %d: %E", catched_signals[idx]);
       }