1 --- sysvinit-2.84/src/killall5.c.foo 2002-07-18 21:48:55.000000000 -0400
2 +++ sysvinit-2.84/src/killall5.c 2002-07-18 22:00:14.000000000 -0400
4 /* Info about a process. */
7 + char *pathname; /* full path to executable */
8 char *fullname; /* Name as found out from argv[0] */
9 char *basename; /* Only the part after the last / */
10 char *statname; /* the statname without braces */
12 for (p = plist; n; p = n) {
14 if (p->fullname) free(p->fullname);
15 + if (p->pathname) free(p->pathname);
20 if (stat(path, &st) == 0) {
23 + p->pathname = (char *)xmalloc(PATH_MAX);
24 + readlink(path, p->pathname, PATH_MAX);
27 /* Link it into the list. */
29 strchr(p->fullname, ' ') ||
31 ok += (strcmp(p->statname, s) == 0);
33 + if (prog[0] == '/' && p->pathname && strcmp(prog,p->pathname))
36 if (ok) add_pid_to_q(q, p);