Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jun 2018 14:24:13 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Eitan Adler <eadler@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r334552 - head/usr.bin/top
Message-ID:  <CANCZdfoXCgCchPgnOU_EPijiq2RTddwSrNAuCKfGYnKK1zegaA@mail.gmail.com>
In-Reply-To: <201806030507.w5357kMm036583@repo.freebsd.org>
References:  <201806030507.w5357kMm036583@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This came up a few days ago on tech-kern@netbsd.org mailing list as well...

Warner

On Sat, Jun 2, 2018, 11:07 PM Eitan Adler <eadler@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;
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoXCgCchPgnOU_EPijiq2RTddwSrNAuCKfGYnKK1zegaA>