/[baselayout]/trunk/src/start-stop-daemon.c
Gentoo

Diff of /trunk/src/start-stop-daemon.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2549 Revision 2563
457static void handle_signal (int sig) 457static void handle_signal (int sig)
458{ 458{
459 int pid; 459 int pid;
460 int status; 460 int status;
461 int serrno = errno; 461 int serrno = errno;
462 char signame[10] = { '\0' };
462 463
463 switch (sig) 464 switch (sig)
464 { 465 {
465 case SIGINT: 466 case SIGINT:
467 if (! signame[0])
468 snprintf (signame, sizeof (signame), "SIGINT");
466 case SIGTERM: 469 case SIGTERM:
470 if (! signame[0])
471 snprintf (signame, sizeof (signame), "SIGTERM");
467 case SIGQUIT: 472 case SIGQUIT:
473 if (! signame[0])
474 snprintf (signame, sizeof (signame), "SIGQUIT");
468 eerrorx ("%s: caught signal %d, aborting", progname, sig); 475 eerrorx ("%s: caught %s, aborting", progname, signame);
469 476
470 case SIGCHLD: 477 case SIGCHLD:
471 while (1) 478 while (1)
472 { 479 {
473 if ((pid = waitpid (-1, &status, WNOHANG)) < 0) 480 if ((pid = waitpid (-1, &status, WNOHANG)) < 0)

Legend:
Removed from v.2549  
changed lines
  Added in v.2563

  ViewVC Help
Powered by ViewVC 1.1.20