← Commit list

5378fbcb3

Eric Andersen
Eric Andersen
2003-08-06
FAILED Duration: 100s

Subject

Joe.C writes:

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/find_pid_by_name.c+5 -1
@@ -25,6 +25,10 @@
#include <stdlib.h>
#include "libbb.h"
+#define COMM_LEN 16 /* synchronize with size of comm in struct task_struct
+ in /usr/include/linux/sched.h */
+
+
/* find_pid_by_name()
*
* Modified by Vladimir Oleynik for use with libbb/procps.c
@@ -46,7 +50,7 @@ extern long* find_pid_by_name( const char* pidName)
#else
while ((p = procps_scan(0)) != 0) {
#endif
- if (strcmp(p->short_cmd, pidName) == 0) {
+ if (strncmp(p->short_cmd, pidName, COMM_LEN-1) == 0) {
pidList=xrealloc( pidList, sizeof(long) * (i+2));
pidList[i++]=p->pid;
}