[BusyBox 0001335]: [BUG] killall5 does not work with path: /path/to/killall5
bugs at busybox.net
bugs at busybox.net
Sun May 6 14:07:24 UTC 2007
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=1335
======================================================================
Reported By: Souf
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 1335
Category: Documentation
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
======================================================================
Date Submitted: 05-06-2007 07:02 PDT
Last Modified: 05-06-2007 07:07 PDT
======================================================================
Summary: [BUG] killall5 does not work with path:
/path/to/killall5
Description:
when I run killall5 like this:
/usr/bin/killall5 -9
why ?
In kill.c :
const int killall = (ENABLE_KILLALL && argv[0][4] == 'a'
&& (!ENABLE_KILLALL5 || argv[0][7] != '5'));
const int killall5 = (ENABLE_KILLALL5 && argv[0][4] == 'a'
&& (!ENABLE_KILLALL || argv[0][7] == '5'));
argv[0][4] = /
argv[0][7] = n
patch:
@@ -30,10 +30,10 @@ int kill_main(int argc, char **argv)
char *arg;
pid_t pid;
int signo = SIGTERM, errors = 0, quiet = 0;
- const int killall = (ENABLE_KILLALL && argv[0][4] == 'a'
- && (!ENABLE_KILLALL5 || argv[0][7] != '5'));
- const int killall5 = (ENABLE_KILLALL5 && argv[0][4] == 'a'
- && (!ENABLE_KILLALL || argv[0][7] == '5'));
+ const int killall = (ENABLE_KILLALL &&
bb_get_last_path_component(argv[0])[4] == 'a'
+ && (!ENABLE_KILLALL5 ||
bb_get_last_path_component(argv[0])[7] != '5'));
+ const int killall5 = (ENABLE_KILLALL5 &&
bb_get_last_path_component(argv[0])[4] == 'a'
+ && (!ENABLE_KILLALL ||
bb_get_last_path_component(argv[0])[7] == '5'));
/* Parse any options */
argc--;
======================================================================
----------------------------------------------------------------------
Souf - 05-06-07 07:07
----------------------------------------------------------------------
Sorry, the category of this report is OTHER not DOCUMENTATION
Issue History
Date Modified Username Field Change
======================================================================
05-06-07 07:02 Souf New Issue
05-06-07 07:02 Souf Status new => assigned
05-06-07 07:02 Souf Assigned To => BusyBox
05-06-07 07:02 Souf File Added: kill.diff
05-06-07 07:07 Souf Note Added: 0002341
======================================================================
More information about the busybox-cvs
mailing list