Ok, this is a pretty major update to sh.c. I renamed all the variables and
[oweals/busybox.git] / kill.c
diff --git a/kill.c b/kill.c
index dd5ca49fa8a2662849b2746c45df99bbc9b33c67..8fa9da77d278f1a598561fe826da4415ca5047f5 100644 (file)
--- a/kill.c
+++ b/kill.c
@@ -204,10 +204,10 @@ extern int kill_main(int argc, char **argv)
                        int pid;
 
                        if (!isdigit(**argv))
-                               fatalError( "Bad PID: %s\n", strerror(errno));
+                               perror_msg_and_die( "Bad PID");
                        pid = strtol(*argv, NULL, 0);
                        if (kill(pid, sig) != 0) 
-                               fatalError( "Could not kill pid '%d': %s\n", pid, strerror(errno));
+                               perror_msg_and_die( "Could not kill pid '%d'", pid);
                        argv++;
                }
        } 
@@ -219,20 +219,20 @@ extern int kill_main(int argc, char **argv)
                while (--argc >= 0) {
                        pid_t* pidList;
 
-                       pidList = findPidByName( *argv);
+                       pidList = find_pid_by_name( *argv);
                        if (!pidList) {
                                all_found = FALSE;
-                               errorMsg( "%s: no process killed\n", *argv);
+                               error_msg( "%s: no process killed\n", *argv);
                        }
 
                        for(; pidList && *pidList!=0; pidList++) {
                                if (*pidList==myPid)
                                        continue;
                                if (kill(*pidList, sig) != 0) 
-                                       fatalError( "Could not kill pid '%d': %s\n", *pidList, strerror(errno));
+                                       perror_msg_and_die( "Could not kill pid '%d'", *pidList);
                        }
                        /* Note that we don't bother to free the memory
-                        * allocated in findPidByName().  It will be freed
+                        * allocated in find_pid_by_name().  It will be freed
                         * upon exit, so we can save a byte or two */
                        argv++;
                }
@@ -245,5 +245,5 @@ extern int kill_main(int argc, char **argv)
 
 
   end:
-       fatalError( "bad signal name: %s\n", *argv);
+       error_msg_and_die( "bad signal name: %s\n", *argv);
 }