Re: Clarification about bug #463538 is needed

2008-07-19 Thread Sergei Golovan
On 7/19/08, Russ Allbery <[EMAIL PROTECTED]> wrote: > It's missing either setsid or ioctl("/dev/tty", TIOCNOTTY). The > semi-standard daemon() function does the right thing. Here's a public > domain replacement (which assumes you have an Autoconf probe for whether > setsid is available). It d

Re: Clarification about bug #463538 is needed

2008-07-19 Thread The Fungi
On Sun, Jul 20, 2008 at 09:14:48AM +1000, Brian May wrote: > Apart from what everyone else has said, I can't help put being slightly > puzzled that it calls fork two times. This just seems weird... > > Or did I miss something? See chapter 13 from "Advanced Programming in the UNIX Environment" (ISB

Re: Clarification about bug #463538 is needed

2008-07-19 Thread Brian May
Sergei Golovan wrote: int status = fork(); if (status != 0) return 0; status = fork(); if (status != 0) return 0; Apart from what everyone else has said, I can't help put being slightly puzzled that it calls fork two times. This just seems weird... Or did I miss someth

Re: Clarification about bug #463538 is needed

2008-07-19 Thread Russ Allbery
"Sergei Golovan" <[EMAIL PROTECTED]> writes: > Erlang does exactly the following when detaches from a terminal: > > if (start_detached) { >int status = fork(); >if (status != 0) > return 0; >status = fork(); >if (status != 0) > return 0; > >close(0); >open("/dev/

Re: Clarification about bug #463538 is needed

2008-07-19 Thread Vincent Bernat
OoO Pendant le repas du samedi 19 juillet 2008, vers 19:28, "Sergei Golovan" <[EMAIL PROTECTED]> disait : > Erlang does exactly the following when detaches from a terminal: > if (start_detached) { >int status = fork(); >if (status != 0) > return 0; >status = fork(); >if

Re: Clarification about bug #463538 is needed

2008-07-19 Thread Mike Hommey
On Sat, Jul 19, 2008 at 09:28:03PM +0400, Sergei Golovan wrote: > On 7/19/08, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > > > > Umm, if that patch fixes it (removing the TIOCSCTTY) then it seems to > > me that the erlang-based service will instead exit when the user who > > installed the

Re: Clarification about bug #463538 is needed

2008-07-19 Thread Stephen Gran
This one time, at band camp, Sergei Golovan said: > On 7/19/08, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > > > > Umm, if that patch fixes it (removing the TIOCSCTTY) then it seems to > > me that the erlang-based service will instead exit when the user who > > installed the server logs ou

Re: Clarification about bug #463538 is needed

2008-07-19 Thread Sergei Golovan
On 7/19/08, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > > Umm, if that patch fixes it (removing the TIOCSCTTY) then it seems to > me that the erlang-based service will instead exit when the user who > installed the server logs out. Evidently the services in erlang are > not properly disa

Re: Clarification about bug #463538 is needed

2008-07-19 Thread Martijn van Oosterhout
On Sat, Jul 19, 2008 at 3:21 PM, Sergei Golovan <[EMAIL PROTECTED]> wrote: > Hi! > > Currently APT fails to start all services which are based on Erlang > (see bug #463538, [1]). It starts the service successfully but after > apt-get finishes the service process get killed. > > I've found a one-lin

Clarification about bug #463538 is needed

2008-07-19 Thread Sergei Golovan
Hi! Currently APT fails to start all services which are based on Erlang (see bug #463538, [1]). It starts the service successfully but after apt-get finishes the service process get killed. I've found a one-line-patch which fixes this bug (see [2]) but I'm not sure if it's correct and doesn't bre