[BusyBox 0001335]: [BUG] killall5 does not work with path: /path/to/killall5

bugs at busybox.net bugs at busybox.net
Sun May 6 22:49:48 UTC 2007


The following issue has been CLOSED 
====================================================================== 
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:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             05-06-2007 07:02 PDT
Last Modified:              05-06-2007 15:49 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 

---------------------------------------------------------------------- 
 vda - 05-06-07 15:49  
---------------------------------------------------------------------- 
Sorry, it's my recent bug. Fixed in rev 18567. Thanks! 

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                          
05-06-07 15:49  vda            Status                   assigned => closed  
05-06-07 15:49  vda            Note Added: 0002342                          
======================================================================




More information about the busybox-cvs mailing list