On Tue, Sep 19, 2006 at 09:13:54PM +0200, Josip Rodin wrote:
> > Please find attached my trivial patch for this problem. It also calls
> > perror() when exec() would fail.
>
> I guess using execvp is okay - I don't see much of a difference, the p
> version is simply more convenient and has little overhead.
>
> However, chdir() could also fail and set errno, and then perror would use
> the wrong prefix. Why not run it conditionally?
Ah, because it doesn't have to be, perror(3) says that "errno is undefined
after a successful library call". I'll still call it conditionally just for
code clarity, but your patch was all right, too. :)
--
2. That which causes joy or happiness.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]