diff options
Diffstat (limited to 'libbb/find_pid_by_name.c')
-rw-r--r-- | libbb/find_pid_by_name.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libbb/find_pid_by_name.c b/libbb/find_pid_by_name.c index 930710f32..570e7bd93 100644 --- a/libbb/find_pid_by_name.c +++ b/libbb/find_pid_by_name.c | |||
@@ -45,11 +45,8 @@ extern long* find_pid_by_name( const char* pidName) | |||
45 | procps_status_t * p; | 45 | procps_status_t * p; |
46 | 46 | ||
47 | pidList = xmalloc(sizeof(long)); | 47 | pidList = xmalloc(sizeof(long)); |
48 | #ifdef CONFIG_SELINUX | 48 | while ((p = procps_scan(0)) != 0) |
49 | while ((p = procps_scan(0, 0, NULL)) != 0) { | 49 | { |
50 | #else | ||
51 | while ((p = procps_scan(0)) != 0) { | ||
52 | #endif | ||
53 | if (strncmp(p->short_cmd, pidName, COMM_LEN-1) == 0) { | 50 | if (strncmp(p->short_cmd, pidName, COMM_LEN-1) == 0) { |
54 | pidList=xrealloc( pidList, sizeof(long) * (i+2)); | 51 | pidList=xrealloc( pidList, sizeof(long) * (i+2)); |
55 | pidList[i++]=p->pid; | 52 | pidList[i++]=p->pid; |