]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
kill: add undocumented -L for compatibility
authorPádraig Brady <P@draigBrady.com>
Sun, 13 Dec 2015 19:54:27 +0000 (19:54 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 14 Dec 2015 13:37:22 +0000 (13:37 +0000)
procps, bash >= 4.4, and util-linux >= 2.23
all have the -L option to output a table.

* src/kill.c (main): Have -L synonymous with -t.
Luckily there is no signal that begins with 'L'.
* tests/misc/kill.sh: Update the test.

src/kill.c
tests/misc/kill.sh

index 2913d99a61d4da081e1d6b3aa9b1fd6e7d816dcc..1d0171bf022cb243f0f3618e702920ce9556edda 100644 (file)
@@ -53,9 +53,9 @@
 
 static char const short_options[] =
   "0::1::2::3::4::5::6::7::8::9::"
-  "A::B::C::D::E::F::G::H::I::J::K::L::M::"
+  "A::B::C::D::E::F::G::H::I::J::K::M::"
   "N::O::P::Q::R::S::T::U::V::W::X::Y::Z::"
-  "ln:s:t";
+  "Lln:s:t";
 
 static struct option const long_options[] =
 {
@@ -249,7 +249,7 @@ main (int argc, char **argv)
         /* Fall through.  */
       case 'A': case 'B': case 'C': case 'D': case 'E':
       case 'F': case 'G': case 'H': case 'I': case 'J':
-      case 'K': case 'L': case 'M': case 'N': case 'O':
+      case 'K': /*case 'L':*/ case 'M': case 'N': case 'O':
       case 'P': case 'Q': case 'R': case 'S': case 'T':
       case 'U': case 'V': case 'W': case 'X': case 'Y':
       case 'Z':
@@ -274,6 +274,7 @@ main (int argc, char **argv)
           usage (EXIT_FAILURE);
         break;
 
+      case 'L': /* -L is not documented, but is for procps compatibility.  */
       case 't':
         table = true;
         /* Fall through.  */
index 61f8498ab98aa9e232c87579549bd75739ab505f..05035684bfa63dedac0b689d6b87d6ac896168ee 100755 (executable)
@@ -42,6 +42,7 @@ env kill -0 -1 || fail=1 # to group
 # table listing
 env kill -l || fail=1
 env kill -t || fail=1
+env kill -L || fail=1 # bash compat
 env kill -t TERM || fail=1
 
 # Verify name to signal number and vice versa