pkill: Add lt- variants
The pgrep code checks to see if the program is run as pkill or pidwait and changes its behaviour accordingly. Some older versions of libtool run the programs as lt-pkill and lt-pidwait which means the tests fail. We add these two program names to the checks. Signed-off-by: Craig Small <csmall@dropbear.xyz>
This commit is contained in:
6
pgrep.c
6
pgrep.c
@ -750,12 +750,14 @@ static void parse_opts (int argc, char **argv)
|
||||
};
|
||||
|
||||
#ifdef ENABLE_PIDWAIT
|
||||
if (strcmp (program_invocation_short_name, "pidwait") == 0) {
|
||||
if (strcmp (program_invocation_short_name, "pidwait") == 0 ||
|
||||
strcmp (program_invocation_short_name, "lt-pidwait") == 0) {
|
||||
prog_mode = PIDWAIT;
|
||||
strcat (opts, "e");
|
||||
} else
|
||||
#endif
|
||||
if (strcmp (program_invocation_short_name, "pkill") == 0) {
|
||||
if (strcmp (program_invocation_short_name, "pkill") == 0 ||
|
||||
strcmp (program_invocation_short_name, "lt-pkill") == 0) {
|
||||
int sig;
|
||||
prog_mode = PKILL;
|
||||
sig = signal_option(&argc, argv);
|
||||
|
Reference in New Issue
Block a user