]> granicus.if.org Git - psmisc/commitdiff
pstree: additional for do not crash on missing processes
authorCraig Small <csmall@dropbear.xyz>
Thu, 14 Nov 2019 22:53:12 +0000 (09:53 +1100)
committerCraig Small <csmall@dropbear.xyz>
Thu, 14 Nov 2019 22:53:12 +0000 (09:53 +1100)
ChangeLog
src/pstree.c

index 98464a1e6e50e83958d945ada2aca657fccc7d7a..4d13742c8651a7b5af104421ebde4abc08017051 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Changes in NEXT
+===============
+       * pstree: Do not crash on missing processes !21
+
 Changes in 23.3
 ===============
        * killall: check also truncated 16 char comm names Debian #912748
@@ -5,6 +9,7 @@ Changes in 23.3
        * peekfd: Add support for ARM64 !19
        * pstree: Add color by age #21
        * fuser: Use larger inode sizes #16
+
 Changes in 23.2
 ===============
        * misc: Command names increased from 16 to 64 characters
index 3de0792c63eb3b7176058fb431afc1447ffd48b7..b05822ec08025c0446863f87dfc16c9270503556 100644 (file)
@@ -1030,8 +1030,9 @@ static void read_proc(void)
 #ifdef WITH_SELINUX
         if (selinux_enabled)
           if (getpidcon(pid, &scontext) < 0) {
-            perror(path);
-            exit(1);
+             (void) fclose(file);
+             free(path);
+             continue;
           }
 #endif                /*WITH_SELINUX */
         if (stat(path, &st) < 0) {