Module Name:    src
Committed By:   eadler
Date:           Sun Jun  3 05:29:27 UTC 2018

Modified Files:
        src/external/bsd/top/dist: top.c

Log Message:
top(1): revert 1.11

This change breaks the expectations of users that would like a coredump
of top(1). Other similar applications such as vmstat(1) don't do this.
Since the change was just a courtesy, revert.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/top/dist/top.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/top/dist/top.c
diff -u src/external/bsd/top/dist/top.c:1.11 src/external/bsd/top/dist/top.c:1.12
--- src/external/bsd/top/dist/top.c:1.11	Sat Jun  2 22:30:19 2018
+++ src/external/bsd/top/dist/top.c	Sun Jun  3 05:29:27 2018
@@ -119,6 +119,7 @@ quit(int status)
 
 {
     screen_end();
+    chdir("/tmp");
     exit(status);
     /* NOTREACHED */
 }
@@ -725,16 +726,6 @@ main(int argc, char *argv[])
     struct statics statics;
     globalstate *gstate;
 
-    /*
-     * Since top(1) is often long running and
-     * doesn't typically care about where its running from
-     * chdir to the root to allow unmounting of its
-     * original wd. Failure is alright as this is
-     * just a courtesy for users.
-     */
-    chdir("/");
-
-
     /* get our name */
     if (argc > 0)
     {

Reply via email to