[PATCH] Finish the task 'sysctl reporting current working directory'

Mateusz Guzik mjguzik at gmail.com
Thu Nov 6 09:26:11 UTC 2014


On Thu, Nov 06, 2014 at 11:21:34AM +0200, Konstantin Belousov wrote:
> On Thu, Nov 06, 2014 at 04:57:50PM +0800, Tiwei Bie wrote:
> > On Thu, Nov 06, 2014 at 09:13:31AM +0100, Mateusz Guzik wrote:
> > > On Mon, Nov 03, 2014 at 04:52:35PM +0800, Tiwei Bie wrote:
> > > 
> > > kernel changes got in in r274167
> > > 
> > > Please submit tmux patch to bugzilla.
> > > 
> > 
> > Thanks! I have submitted the tmux patch to bugzilla [1].
> > 
> > [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194858
> 
> This is incorrect way to use kern_proc_cwd.  You should try the new
> sysctl, and on ENOENT fall back to the kern_proc_file.  Expecting
> that the binary is run on the same machine where it was build is
> wrong.
> 

Fair point.

Please keep kern_proc_cwd ifdefed and have a static var so that initial
failure is remembered and the code knows not to execute it again.

-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the freebsd-hackers mailing list