Andrew Gay | 3 Dec 22:43

Re: [PATCH] pppd/persist, linux 2.14.19+ - PPPIOCDETACH error

  There are probably things that this would fix, but I don't think it 
would help here, as I mentioned in my previous reply. The existing code 
in run_program() already closes the fd before it does the execve(). We 
just need to be sure that's done before the parent process proceeds. I'm 
sure my approach isn't the only way to do that (but it's worked 
flawlessly for me so far) - anyone care to suggest a better way?

BTW - I realised that I had malloc'ed the sigaction struct but forgotten 
to free it - there needs to be a call to free(tidysig) right after the 
pause().

- Andy

Frank Cusack wrote:

>On Fri, Nov 29, 2002 at 10:21:02AM +1100, James Cameron wrote:
>  
>
>>Would it make more sense to set the ppp fd to be close-on-exec so that
>>the child process that runs ip-down doesn't inherit it? 
>>fcntl(fd,F_SETFD,FD_CLOEXEC)
>>    
>>
>
>Yep.  That fix has been suggested for some other problem as well and seems
>better.
>
>/fc
>-
>To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
>the body of a message to majordomo <at> vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>  
>

-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane