svn commit: r334552 - head/usr.bin/top

Warner Losh imp at bsdimp.com
Sun Jun 3 20:25:29 UTC 2018


Also, this is a mistake. You should put it back in.

Warner

On Sat, Jun 2, 2018, 11:07 PM Eitan Adler <eadler at freebsd.org> wrote:

> Author: eadler
> Date: Sun Jun  3 05:07:46 2018
> New Revision: 334552
> URL: https://svnweb.freebsd.org/changeset/base/334552
>
> Log:
>   top(1): remove chdir to /
>
>   While this came out of a conversation in IRC, it turn out that some
>   people don't like it. Since this was a courtesy feature, just remove it.
>
> Modified:
>   head/usr.bin/top/top.c
>
> Modified: head/usr.bin/top/top.c
>
> ==============================================================================
> --- head/usr.bin/top/top.c      Sun Jun  3 05:07:39 2018        (r334551)
> +++ head/usr.bin/top/top.c      Sun Jun  3 05:07:46 2018        (r334552)
> @@ -260,15 +260,6 @@ main(int argc, char *argv[])
>  #define CMD_order      26
>  #define CMD_pid                27
>
> -    /*
> -     * 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("/");
> -
>      /* set the buffer for stdout */
>  #ifdef DEBUG
>      extern FILE *debug;
>
>


More information about the svn-src-all mailing list