/[baselayout]/trunk/src/runscript.c
Gentoo

Diff of /trunk/src/runscript.c

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

Revision 2560 Revision 2563
92static void handle_signal (int sig) 92static void handle_signal (int sig)
93{ 93{
94 pid_t pid; 94 pid_t pid;
95 int status; 95 int status;
96 int serrno = errno; 96 int serrno = errno;
97 char signame[10] = { '\0' };
97 98
98 switch (sig) 99 switch (sig)
99 { 100 {
100 case SIGHUP: 101 case SIGHUP:
101 sighup = true; 102 sighup = true;
111 eerror ("waitpid: %s", strerror (errno)); 112 eerror ("waitpid: %s", strerror (errno));
112 return; 113 return;
113 } 114 }
114 } while (! WIFEXITED (status) && ! WIFSIGNALED (status)); 115 } while (! WIFEXITED (status) && ! WIFSIGNALED (status));
115 break; 116 break;
116 117
117 case SIGINT: 118 case SIGINT:
119 if (! signame[0])
120 snprintf (signame, sizeof (signame), "SIGINT");
118 case SIGTERM: 121 case SIGTERM:
122 if (! signame[0])
123 snprintf (signame, sizeof (signame), "SIGTERM");
119 case SIGQUIT: 124 case SIGQUIT:
125 if (! signame[0])
126 snprintf (signame, sizeof (signame), "SIGQUIT");
120 eerrorx ("%s: caught signal %d, aborting", applet, sig); 127 eerrorx ("%s: caught %s, aborting", applet, signame);
121 128
122 default: 129 default:
123 eerror ("%s: caught unknown signal %d", applet, sig); 130 eerror ("%s: caught unknown signal %d", applet, sig);
124 } 131 }
125 132

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

  ViewVC Help
Powered by ViewVC 1.1.20