[BusyBox 0004054]: busybox 1.9.1 killall command doesn't work

bugs at busybox.net bugs at busybox.net
Thu Jul 10 23:41:34 UTC 2008


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=4054 
====================================================================== 
Reported By:                bwondu
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   4054
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             07-10-2008 15:41 PDT
Last Modified:              07-10-2008 16:41 PDT
====================================================================== 
Summary:                    busybox 1.9.1 killall command doesn't work
Description: 
executing killall <processname> retrun killall: <processname>: no process
killed

I tried to do the same thing as in busybox 1.1.0 which is in
libbb/procps.c (read_to_buf() function) replace any character < ' ' in the
string read from /proc/%d/cmdline.  In libbb/find_pid_by_name.c
(find_pid_by_name() function), I removed the call to bb_basename and did a
strstr instead of strcmp and it worked.  But since there are other
dependencies to these functions, I want to make sure that this doesn't
break anything.  If you have a better fix for it please let me know as
killall in Busybox 1.1.0 works perfectly fine. Thanks
====================================================================== 

---------------------------------------------------------------------- 
 vda - 07-10-08 16:41  
---------------------------------------------------------------------- 
Before trying to fix it, we need to understand how exactly it fails.

Does it happen with 1.11.0? For me it works:

# strace -o log killall top

# tail log
read(5, "32314 (mc) S 32312 32314 32312 3"..., 1023) = 244
close(5)                                = 0
open("/proc/32314/cmdline", O_RDONLY|O_LARGEFILE) = 5
read(5, "/usr/bin/mc\0-d\0", 1023)      = 15
close(5)                                = 0
getdents64(3, /* 0 entries */, 1024)    = 0
close(3)                                = 0
kill(707, SIGTERM)                      = 0
kill(14022, SIGTERM)                    = 0
_exit(0)                                = ?

Can you provide your example? Attach full strace log to this bug. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-10-08 15:41  bwondu         New Issue                                    
07-10-08 15:41  bwondu         Status                   new => assigned     
07-10-08 15:41  bwondu         Assigned To               => BusyBox         
07-10-08 16:41  vda            Note Added: 0009134                          
======================================================================




More information about the busybox-cvs mailing list