~ubuntu-branches/ubuntu/oneiric/cups/oneiric

« back to all changes in this revision

Viewing changes to scheduler/process.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-04-09 16:19:16 UTC
  • mto: (25.1.2 lucid) (55.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20100409161916-k0e6prz52ubf4vlg
Tags: upstream-1.4.3
ImportĀ upstreamĀ versionĀ 1.4.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: process.c 8644 2009-05-16 03:04:48Z mike $"
 
2
 * "$Id: process.c 8940 2009-12-19 00:37:42Z mike $"
3
3
 *
4
4
 *   Process management routines for the Common UNIX Printing System (CUPS).
5
5
 *
488
488
      * Reset group membership to just the main one we belong to.
489
489
      */
490
490
 
491
 
      setgid(Group);
492
 
      setgroups(1, &Group);
 
491
      if (setgid(Group) && !RunUser)
 
492
        exit(errno);
 
493
 
 
494
      if (setgroups(1, &Group) && !RunUser)
 
495
        exit(errno);
493
496
    }
494
497
 
495
498
   /*
505
508
#ifdef HAVE_SIGSET
506
509
    sigset(SIGTERM, SIG_DFL);
507
510
    sigset(SIGCHLD, SIG_DFL);
 
511
    sigset(SIGPIPE, SIG_DFL);
508
512
#elif defined(HAVE_SIGACTION)
509
513
    memset(&action, 0, sizeof(action));
510
514
 
513
517
 
514
518
    sigaction(SIGTERM, &action, NULL);
515
519
    sigaction(SIGCHLD, &action, NULL);
 
520
    sigaction(SIGPIPE, &action, NULL);
516
521
#else
517
522
    signal(SIGTERM, SIG_DFL);
518
523
    signal(SIGCHLD, SIG_DFL);
 
524
    signal(SIGPIPE, SIG_DFL);
519
525
#endif /* HAVE_SIGSET */
520
526
 
521
527
    cupsdReleaseSignals();
624
630
 
625
631
 
626
632
/*
627
 
 * End of "$Id: process.c 8644 2009-05-16 03:04:48Z mike $".
 
633
 * End of "$Id: process.c 8940 2009-12-19 00:37:42Z mike $".
628
634
 */