Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-11 Thread Natanael Copa
On Thu, 2008-07-10 at 15:12 +0200, Denys Vlasenko wrote: You misunderstood me. I said If something can be made to use PATH in a sense if a program needs to start another program, for God's sake, do NOT hardcode [/usr/][s]bin prefix! In other words: execve(/bin/vi...); // BAD

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-11 Thread Denys Vlasenko
On Fri, Jul 11, 2008 at 9:31 AM, Natanael Copa [EMAIL PROTECTED] wrote: You misunderstood me. I said If something can be made to use PATH in a sense if a program needs to start another program, for God's sake, do NOT hardcode [/usr/][s]bin prefix! In other words: execve(/bin/vi...); // BAD

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-10 Thread walter harms
Denys Vlasenko wrote: On Tuesday 01 July 2008 12:55, Roy Marples wrote: On Tuesday 01 July 2008 13:44:52 Denys Vlasenko wrote: On Tuesday 01 July 2008 12:25, Roy Marples wrote: On Tuesday 01 July 2008 13:01:56 Denys Vlasenko wrote: ssd: do not stat -x EXECUTABLE, it is not needed anymore

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-10 Thread Denys Vlasenko
Historically, surprising percentage of Unix admins have no clue why $PATH is useful. Whenever they meet a configuration problem causing PATH search to not find their utility, they fix it by using full path. Whereas correct fix is to fix $PATH or copy/move/symplink executable to one of the

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-05 Thread Rob Landley
On Tuesday 01 July 2008 08:21:51 Denys Vlasenko wrote: On Tuesday 01 July 2008 12:55, Roy Marples wrote: On Tuesday 01 July 2008 13:44:52 Denys Vlasenko wrote: On Tuesday 01 July 2008 12:25, Roy Marples wrote: On Tuesday 01 July 2008 13:01:56 Denys Vlasenko wrote: ssd: do not stat

[PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Andreas Wetzel
hi again, in start-stop-daemon, if --background is given, i think we should completely detach the called process, including closing all extra file-descriptors. for non-mmu, this seems to be the case. but if BB_MMU is set, we do not set the DAEMON_CLOSE_EXTRA_FDS flag when calling

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Roy Marples
On Tuesday 01 July 2008 09:27:22 Andreas Wetzel wrote: hi again, in start-stop-daemon, if --background is given, i think we should completely detach the called process, including closing all extra file-descriptors. for non-mmu, this seems to be the case. but if BB_MMU is set, we do not set

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Andreas Wetzel
Roy Marples wrote: On Tuesday 01 July 2008 09:27:22 Andreas Wetzel wrote: hi again, in start-stop-daemon, if --background is given, i think we should completely detach the called process, including closing all extra file-descriptors. for non-mmu, this seems to be the case. but if BB_MMU is

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Denys Vlasenko
On Tuesday 01 July 2008 10:27, Andreas Wetzel wrote: hi again, in start-stop-daemon, if --background is given, i think we should completely detach the called process, including closing all extra file-descriptors. for non-mmu, this seems to be the case. but if BB_MMU is set, we do not

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Denys Vlasenko
On Tuesday 01 July 2008 10:53, Roy Marples wrote: On Tuesday 01 July 2008 09:27:22 Andreas Wetzel wrote: hi again, in start-stop-daemon, if --background is given, i think we should completely detach the called process, including closing all extra file-descriptors. for non-mmu, this

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Roy Marples
On Tuesday 01 July 2008 13:03:00 Denys Vlasenko wrote: I would expect this to work echo password | start-stop-daemon --start --exec /usr/sbin/pppd --background -- plugins passwdfd 0 Your patch would break that yes? It already does not work, if I read code correctly (bb_daemonize()

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Roy Marples
On Tuesday 01 July 2008 13:01:56 Denys Vlasenko wrote: ssd: do not stat -x EXECUTABLE, it is not needed anymore Then userland won't catch an error with ssd --background when the file does not exit :/ Please re-consider this. Thanks Roy ___ busybox

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Denys Vlasenko
On Tuesday 01 July 2008 12:25, Roy Marples wrote: On Tuesday 01 July 2008 13:01:56 Denys Vlasenko wrote: ssd: do not stat -x EXECUTABLE, it is not needed anymore Then userland won't catch an error with ssd --background when the file does not exit :/ Please re-consider this. With that

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Roy Marples
On Tuesday 01 July 2008 13:44:52 Denys Vlasenko wrote: On Tuesday 01 July 2008 12:25, Roy Marples wrote: On Tuesday 01 July 2008 13:01:56 Denys Vlasenko wrote: ssd: do not stat -x EXECUTABLE, it is not needed anymore Then userland won't catch an error with ssd --background when the file

Re: [PATCH] start-stop-daemon: close extra fds on --background

2008-07-01 Thread Denys Vlasenko
On Tuesday 01 July 2008 12:55, Roy Marples wrote: On Tuesday 01 July 2008 13:44:52 Denys Vlasenko wrote: On Tuesday 01 July 2008 12:25, Roy Marples wrote: On Tuesday 01 July 2008 13:01:56 Denys Vlasenko wrote: ssd: do not stat -x EXECUTABLE, it is not needed anymore Then userland