]> granicus.if.org Git - psmisc/commitdiff
killall message change
authorCraig Small <csmall@users.sourceforge.net>
Sun, 29 Apr 2007 23:05:33 +0000 (23:05 +0000)
committerCraig Small <csmall@users.sourceforge.net>
Sun, 29 Apr 2007 23:05:33 +0000 (23:05 +0000)
ChangeLog
src/killall.c

index a3c7efbf5574e9bd5468b184fd416b10718b84a7..662a7676aff02bc063673a0c29ddee8eb477f872 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 Changes in ??
 =============
-2007-04-30 Benno Schulenberg
-       * Fixed up NLS for fuser
+2007-04-30 Craig Small
+       * Fixed up NLS for fuser, patch from Benno Schulenberg
+       * killall asks for Signal (procname) if not SIGTERM
 
 Changes in 22.5
 ===============
index 1c953facdb726aee8f53c75db24cad821c6d4176..60f34303718254048119103691fbe724ee576d6b 100644 (file)
@@ -2,7 +2,7 @@
  * killall.c - kill processes by name or list PIDs
  *
  * Copyright (C) 1993-2002 Werner Almesberger
- * Copyright (C) 2002-2005 Craig Small
+ * Copyright (C) 2002-2007 Craig Small
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ static int verbose = 0, exact = 0, interactive = 0, reg = 0,
            ignore_case = 0, pidof;
 
 static int
-ask (char *name, pid_t pid)
+ask (char *name, pid_t pid, const int signal)
 {
   int res;
   size_t len;
@@ -70,8 +70,13 @@ ask (char *name, pid_t pid)
   len = 0;
 
   do {
-    printf (_("Kill %s(%s%d) ? (y/N) "), name, process_group ? "pgid " : "",
-           pid);
+    if (signal == SIGTERM)
+        printf (_("Kill %s(%s%d) ? (y/N) "), name, process_group ? "pgid " : "",
+               pid);
+    else
+        printf (_("Signal %s(%s%d) ? (y/N) "), name, process_group ? "pgid " : "",
+               pid);
+
     fflush (stdout);
 
     if (getline (&line, &len, stdin) < 0)
@@ -425,7 +430,7 @@ kill_all (int signal, int names, char **namelist, struct passwd *pwent)
            if (j < i)
              continue;
          }     
-       if (interactive && !ask (comm, id))
+       if (interactive && !ask (comm, id, signal))
          continue;
        if (pidof)
          {