diff options
Diffstat (limited to 'kill.c')
-rw-r--r-- | kill.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -204,10 +204,10 @@ extern int kill_main(int argc, char **argv) | |||
204 | int pid; | 204 | int pid; |
205 | 205 | ||
206 | if (!isdigit(**argv)) | 206 | if (!isdigit(**argv)) |
207 | fatalError( "Bad PID: %s\n", strerror(errno)); | 207 | error_msg_and_die( "Bad PID: %s\n", strerror(errno)); |
208 | pid = strtol(*argv, NULL, 0); | 208 | pid = strtol(*argv, NULL, 0); |
209 | if (kill(pid, sig) != 0) | 209 | if (kill(pid, sig) != 0) |
210 | fatalError( "Could not kill pid '%d': %s\n", pid, strerror(errno)); | 210 | error_msg_and_die( "Could not kill pid '%d': %s\n", pid, strerror(errno)); |
211 | argv++; | 211 | argv++; |
212 | } | 212 | } |
213 | } | 213 | } |
@@ -219,20 +219,20 @@ extern int kill_main(int argc, char **argv) | |||
219 | while (--argc >= 0) { | 219 | while (--argc >= 0) { |
220 | pid_t* pidList; | 220 | pid_t* pidList; |
221 | 221 | ||
222 | pidList = findPidByName( *argv); | 222 | pidList = find_pid_by_name( *argv); |
223 | if (!pidList) { | 223 | if (!pidList) { |
224 | all_found = FALSE; | 224 | all_found = FALSE; |
225 | errorMsg( "%s: no process killed\n", *argv); | 225 | error_msg( "%s: no process killed\n", *argv); |
226 | } | 226 | } |
227 | 227 | ||
228 | for(; pidList && *pidList!=0; pidList++) { | 228 | for(; pidList && *pidList!=0; pidList++) { |
229 | if (*pidList==myPid) | 229 | if (*pidList==myPid) |
230 | continue; | 230 | continue; |
231 | if (kill(*pidList, sig) != 0) | 231 | if (kill(*pidList, sig) != 0) |
232 | fatalError( "Could not kill pid '%d': %s\n", *pidList, strerror(errno)); | 232 | error_msg_and_die( "Could not kill pid '%d': %s\n", *pidList, strerror(errno)); |
233 | } | 233 | } |
234 | /* Note that we don't bother to free the memory | 234 | /* Note that we don't bother to free the memory |
235 | * allocated in findPidByName(). It will be freed | 235 | * allocated in find_pid_by_name(). It will be freed |
236 | * upon exit, so we can save a byte or two */ | 236 | * upon exit, so we can save a byte or two */ |
237 | argv++; | 237 | argv++; |
238 | } | 238 | } |
@@ -245,5 +245,5 @@ extern int kill_main(int argc, char **argv) | |||
245 | 245 | ||
246 | 246 | ||
247 | end: | 247 | end: |
248 | fatalError( "bad signal name: %s\n", *argv); | 248 | error_msg_and_die( "bad signal name: %s\n", *argv); |
249 | } | 249 | } |