NetBSD-Bugs archive

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

Re: misc/47251: rc.d script using _chdir silently crashes

The following reply was made to PR misc/47251; it has been noted by GNATS.

From: Guillaume <>
Subject: Re: misc/47251: rc.d script using _chdir silently crashes
Date: Tue, 27 Nov 2012 22:09:15 +0100

 >  I think you're misunderstanding the use and purpse of that variable.
 I did actually ^^
 >  If I have it right, ${name}_chdir is intended to set the directory that
 >  will be used (chdir'd do) before the command is run - but only then.
 >  You are assuming that the script will chdir to that directory before doing
 >  anthing else - like testing whether the command exists, etc.   It doesn't.
 >  You don't get to refer to the command ysing a relative path from
 >  ${name}_chdir (or anything else using it) - that's just what will be
 >  the command's working directory, after it starts.
 >  For the script, you should assume you have no idea what directory you're
 >  running in, and use full path names (or $PATH) to resolve filenames.
 Thanks a lot for your time,

Home | Main Index | Thread Index | Old Index