Re: [RFC PATCH 1/2] Report exec errors from run-command
- From
- Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
- Date
- Dec 25, 2009, 17:15 UTC
- Message-ID
- <20091225171505.GA11830@Knoppix>
- In-Reply-To
- <200912251539.35201.j6t@kdbg.org>
On Fri, Dec 25, 2009 at 03:39:34PM +0100, Johannes Sixt wrote:
> > The only really *important* errno of a failed exec is ENOENT. For this case, > wouldn't it be easier to do the PATH lookup manually in the parent (before > the fork()), and use execv() in the forked child rather than execvp()?
In fact there is API for getting all valid commands on $PATH for given command prefix. That would take care of ENOENT and most of EACCESS.
But OTOH, its nice to be able to report any error.
-Ilari