| Summary: | procps_scan() incorrect behaviour | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Leonid <lly.dev> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | busybox-cvs |
| Priority: | P1 | ||
| Version: | 1.15.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | linux-mips | |
| Build: | 1.15.1 | ||
| Attachments: | This patch solves problem for me | ||
Reproduced. Try this patch: http://busybox.net/downloads/fixes-1.15.1/busybox-1.15.1-pidof_killall.patch Your variant of fix works well too, thanks. |
Created attachment 667 [details] This patch solves problem for me In case of call procps_scan() function with mask PSSCAN_PID|PSSCAN_COMM|PSSCAN_ARGVN|PSSCAN_EXE as in find_pid_by_name() and some process has empty /proc/<pid>/cmdline (kernel daemon for example), it leaves previous results for sp->exe! As result, find_pid_by_name() used in killall applet can give us wrong additional pids! Sample part of real ps output: ... 68 nobody 800 S dnsmasq 69 admin 0 SW [khubd] 83 admin 964 S l2tpd ... killall -1 dnsmasq tries to send SIGHUP to both 68 & 69 pids ! Patch attached, solves problem for me.