which: fix testsuite failure

pidof: do not output empty line if nothing found
testsuite: disable false positive
This commit is contained in:
Denis Vlasenko
2007-11-25 04:54:13 +00:00
parent 72e76044cf
commit 6446c2d4ab
5 changed files with 13 additions and 8 deletions

View File

@@ -63,7 +63,7 @@ pid_t* find_pid_by_name(const char* procName)
(!p->comm[sizeof(p->comm)-2] && strcmp(p->comm, procName) == 0)
/* or we require argv0 to match (essential for matching reexeced /proc/self/exe)*/
|| (p->argv0 && strcmp(bb_basename(p->argv0), procName) == 0)
/* TOOD: we can also try exe, do we want that? */
/* TOOD: we can also try /proc/NUM/exe link, do we want that? */
) {
pidList = xrealloc(pidList, sizeof(*pidList) * (i+2));
pidList[i++] = p->pid;