summaryrefslogtreecommitdiff
path: root/libbb/find_pid_by_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/find_pid_by_name.c')
-rw-r--r--libbb/find_pid_by_name.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/find_pid_by_name.c b/libbb/find_pid_by_name.c
index b6602b9..b8490b7 100644
--- a/libbb/find_pid_by_name.c
+++ b/libbb/find_pid_by_name.c
@@ -41,7 +41,11 @@ extern long* find_pid_by_name( const char* pidName)
procps_status_t * p;
pidList = xmalloc(sizeof(long));
+#ifdef CONFIG_SELINUX
+ while ((p = procps_scan(0, 0, NULL)) != 0) {
+#else
while ((p = procps_scan(0)) != 0) {
+#endif
if (strcmp(p->short_cmd, pidName) == 0) {
pidList=xrealloc( pidList, sizeof(long) * (i+2));
pidList[i++]=p->pid;