diff --git a/killproc-2.16.dif b/killproc-2.16.dif index 8e7ba3d..d5be3ad 100644 --- a/killproc-2.16.dif +++ b/killproc-2.16.dif @@ -1,6 +1,30 @@ +--- .dummy ++++ .dummy 2009-08-19 12:18:39.181901099 +0200 +@@ -0,0 +1 @@ ++this is a dummy, remove if real changes are required --- libinit.c -+++ libinit.c 2009-09-29 10:42:09.875428620 +0200 -@@ -446,9 +446,9 @@ static pid_t getpppid(const pid_t ppid) ++++ libinit.c 2009-10-28 10:47:13.711429753 +0100 +@@ -320,13 +320,15 @@ static ssize_t xread(int fd, void *inbuf + while (1) { + errno = 0; + bytes = read(fd, inbuf, count); +- if (bytes < 0 && (errno == EINTR || errno == EAGAIN)) +- continue; +- if (bytes < 0) ++ if (bytes < 0) { ++ if (errno == EINTR || errno == EAGAIN)) ++ continue; ++ if (errno == ESRCH) ++ goto out; + break; ++ } + goto out; + } +- + warn("xread error: %s\n", strerror(errno)); + out: + errno = olderr; +@@ -446,9 +448,9 @@ static pid_t getpppid(const pid_t ppid) goto out; if ((fp = open(proc(pid, "stat"), O_PROCMODE)) != -1) { @@ -12,7 +36,7 @@ warn("can not read ppid for process %d!\n", ppid); } out: -@@ -591,10 +591,11 @@ int pidof (const char * inname, const ch +@@ -591,10 +593,11 @@ int pidof (const char * inname, const ch char ent[3]; boolean thread; ssize_t len; @@ -25,7 +49,7 @@ continue; thread = (strncmp(ent, "0 ", 2) == 0); -@@ -682,6 +683,9 @@ int pidof (const char * inname, const ch +@@ -682,6 +685,9 @@ int pidof (const char * inname, const ch len = xread(fp, entry, PATH_MAX); close(fp); @@ -35,7 +59,7 @@ /* Seek for a script not for a binary */ if (!(scrpt = checkscripts(entry, root, len, d->d_name))) continue; -@@ -713,7 +717,7 @@ int pidof (const char * inname, const ch +@@ -713,7 +719,7 @@ int pidof (const char * inname, const ch len = xread(fp, entry, PATH_MAX); close(fp); @@ -44,7 +68,7 @@ continue; comm = index(entry, ' '); -@@ -764,7 +768,8 @@ int verify_pidfile (const char * pid_fil +@@ -764,7 +770,8 @@ int verify_pidfile (const char * pid_fil const char * root, unsigned short flags, const boolean ignore) { @@ -54,7 +78,7 @@ boolean isscrpt = false; pid_t pid; char *swapname = NULL, *bufp; -@@ -789,11 +794,12 @@ int verify_pidfile (const char * pid_fil +@@ -789,11 +796,12 @@ int verify_pidfile (const char * pid_fil } errno = 0; @@ -69,7 +93,7 @@ buf[cnt] = '\0'; bufp = buf; -@@ -847,10 +853,11 @@ int verify_pidfile (const char * pid_fil +@@ -847,10 +855,11 @@ int verify_pidfile (const char * pid_fil char ent[3]; boolean thread; ssize_t len; @@ -82,7 +106,7 @@ goto out; thread = (strncmp(ent, "0 ", 2) == 0); -@@ -932,6 +939,9 @@ int verify_pidfile (const char * pid_fil +@@ -932,6 +941,9 @@ int verify_pidfile (const char * pid_fil len = xread(fp, entry, PATH_MAX); close(fp); @@ -92,7 +116,7 @@ /* Seek for a script not for a binary */ if (!(scrpt = checkscripts(entry, root, len, buf))) goto out; /* Nothing found */ -@@ -951,7 +961,7 @@ int verify_pidfile (const char * pid_fil +@@ -951,7 +963,7 @@ int verify_pidfile (const char * pid_fil len = xread(fp, entry, PATH_MAX); close(fp); @@ -101,7 +125,7 @@ goto out; comm = index(entry, ' '); -@@ -1040,7 +1050,7 @@ int check_pids (const char * inname, con +@@ -1040,7 +1052,7 @@ int check_pids (const char * inname, con len = xread(fp, ent, sizeof(ent)); close(fp); @@ -110,7 +134,7 @@ goto ignore; /* Bogus */ thread = (strncmp(ent, "0 ", 2) == 0); -@@ -1111,7 +1121,7 @@ int check_pids (const char * inname, con +@@ -1111,7 +1123,7 @@ int check_pids (const char * inname, con len = xread(fp, entry, PATH_MAX); close(fp); @@ -119,7 +143,7 @@ goto ignore; /* Bogus */ /* Seek for a script not for a binary */ -@@ -1131,7 +1141,7 @@ int check_pids (const char * inname, con +@@ -1131,7 +1143,7 @@ int check_pids (const char * inname, con len = xread(fp, entry, PATH_MAX); close(fp); diff --git a/sysvinit.changes b/sysvinit.changes index 05c86f8..fb220f0 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 28 10:47:42 CET 2009 - werner@suse.de + +- Avoid message on terminated process during reading its /proc files + ------------------------------------------------------------------- Tue Sep 29 10:48:03 CEST 2009 - werner@suse.de