]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x changes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 2 May 2003 15:54:50 +0000 (15:54 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 2 May 2003 15:54:50 +0000 (15:54 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@3691 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.1.txt
scheduler/main.c

index 1b675deb6e3bdf2deab54f7cb845de8f347b1d3f..6e49e7ab3a2438fd409c14146a6ff97344c7149c 100644 (file)
@@ -1,6 +1,14 @@
 CHANGES-1.1.txt
 ---------------
 
+CHANGES IN CUPS V1.1.19
+
+       - The scheduler child might send SIGUSR1 to the parent
+         before the signal handler was installed; this didn't
+         prevent the scheduler from starting but produced an
+         annoying error message (STR #45)
+
+
 CHANGES IN CUPS V1.1.19rc4
 
        - The lp command did not accept "-" for printing from
index 88c507d1d6a5abf72433da281a80aed1033c14c4..e6fc34ddd54d6af5e61f165bfdbe18c119f5cfcf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: main.c,v 1.57.2.44 2003/05/01 18:00:19 mike Exp $"
+ * "$Id: main.c,v 1.57.2.45 2003/05/02 15:54:50 mike Exp $"
  *
  *   Scheduler main loop for the Common UNIX Printing System (CUPS).
  *
@@ -171,34 +171,38 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
   if (!fg)
   {
-    if (fork() > 0)
-    {
-     /*
-      * OK, wait for the child to startup and send us SIGUSR1...  We
-      * also need to ignore SIGHUP which might be sent by the init
-      * script to restart the scheduler...
-      */
+   /*
+    * Setup signal handlers for the parent...
+    */
 
 #ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
-      sigset(SIGUSR1, sigusr1_handler);
+    sigset(SIGUSR1, sigusr1_handler);
 
-      sigset(SIGHUP, SIG_IGN);
+    sigset(SIGHUP, SIG_IGN);
 #elif defined(HAVE_SIGACTION)
-      memset(&action, 0, sizeof(action));
-      sigemptyset(&action.sa_mask);
-      sigaddset(&action.sa_mask, SIGUSR1);
-      action.sa_handler = sigusr1_handler;
-      sigaction(SIGUSR1, &action, NULL);
-
-      sigemptyset(&action.sa_mask);
-      action.sa_handler = SIG_IGN;
-      sigaction(SIGHUP, &action, NULL);
+    memset(&action, 0, sizeof(action));
+    sigemptyset(&action.sa_mask);
+    sigaddset(&action.sa_mask, SIGUSR1);
+    action.sa_handler = sigusr1_handler;
+    sigaction(SIGUSR1, &action, NULL);
+
+    sigemptyset(&action.sa_mask);
+    action.sa_handler = SIG_IGN;
+    sigaction(SIGHUP, &action, NULL);
 #else
-      signal(SIGUSR1, sigusr1_handler);
+    signal(SIGUSR1, sigusr1_handler);
 
-      signal(SIGHUP, SIG_IGN);
+    signal(SIGHUP, SIG_IGN);
 #endif /* HAVE_SIGSET */
 
+    if (fork() > 0)
+    {
+     /*
+      * OK, wait for the child to startup and send us SIGUSR1...  We
+      * also need to ignore SIGHUP which might be sent by the init
+      * script to restart the scheduler...
+      */
+
       if (wait(&i) < 0)
         i = 0;
 
@@ -1071,5 +1075,5 @@ usage(void)
 
 
 /*
- * End of "$Id: main.c,v 1.57.2.44 2003/05/01 18:00:19 mike Exp $".
+ * End of "$Id: main.c,v 1.57.2.45 2003/05/02 15:54:50 mike Exp $".
  */