1 --- sysvinit-2.86/src/killall5.c.orig 2004-07-30 14:16:23.000000000 +0200
2 +++ sysvinit-2.86/src/killall5.c 2004-12-26 23:05:17.284315424 +0100
5 /* Info about a process. */
7 + char *pathname; /* full path to executable */
8 char *argv0; /* Name as found out from argv[0] */
9 - char *argv0base; /* `basename argv[1]` */
10 + char *argv0base; /* `basename argv[0]` */
11 char *argv1; /* Name as found out from argv[1] */
12 char *argv1base; /* `basename argv[1]` */
13 char *statname; /* the statname without braces */
16 if (p->argv0) free(p->argv0);
17 if (p->argv1) free(p->argv1);
18 + if (p->pathname) free(p->pathname);
23 if (stat(path, &st) == 0) {
26 + p->pathname = (char *)xmalloc(PATH_MAX);
27 + readlink(path, p->pathname, PATH_MAX);
30 /* Link it into the list. */
32 strchr(p->argv0, ' '))) {
33 ok += (strcmp(p->statname, s) == 0);
36 + if (prog[0] == '/' && p->pathname && strcmp(prog, p->pathname))
39 if (ok) add_pid_to_q(q, p);