Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/top/dist top(1): revert 1.11



details:   https://anonhg.NetBSD.org/src/rev/a5ec58fdb3d8
branches:  trunk
changeset: 323181:a5ec58fdb3d8
user:      eadler <eadler%NetBSD.org@localhost>
date:      Sun Jun 03 05:29:27 2018 +0000

description:
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.

diffstat:

 external/bsd/top/dist/top.c |  11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diffs (28 lines):

diff -r 4ef3120ed70f -r a5ec58fdb3d8 external/bsd/top/dist/top.c
--- a/external/bsd/top/dist/top.c       Sun Jun 03 04:41:04 2018 +0000
+++ b/external/bsd/top/dist/top.c       Sun Jun 03 05:29:27 2018 +0000
@@ -119,6 +119,7 @@
 
 {
     screen_end();
+    chdir("/tmp");
     exit(status);
     /* NOTREACHED */
 }
@@ -725,16 +726,6 @@
     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)
     {



Home | Main Index | Thread Index | Old Index