[JDEV] Parent PID changed, exiting...
Ayite Gaba
ayite at hotmail.com
Wed Feb 14 06:23:08 CST 2001
Hi Keith,
My jabber.xml does not have any <stdout/> tag in it. :(
-- Ayite
>From: Keith Minkler Reply-To: jdev at jabber.org To: jdev at jabber.org Subject:
>Re: [JDEV] Parent PID changed, exiting... Date: Mon, 12 Feb 2001 23:04:39
>-0500
>
>No, that function is correct... A jabberd using base_stdout should die when
>it's parent dies, since the parent will be another jabberd.
>
>Check your config file for the flag... you should not be using this flag in
>a standalone jabberd.
>
>Keith Minkler
>
>On Tue, Feb 13, 2001 at 02:07:25AM +0000, Ayite Gaba wrote: > Let's me see
>if i get this right. > To fix the "Parent PID changed" problem i have to
>modify the body of this > function: result base_stdout_heartbeat(void *arg)
> > > Is that it? I do not need to modify any other config files? if i still
>do > have to do more modifications, please let me known which ones. Thanks
>a lot > for your help, -- Ayite > > > >From: Keith Minkler > >Reply-To:
>jdev at jabber.org > >To: jdev at jabber.org > >Subject: Re: [JDEV] Parent PID
>changed, exiting... > >Date: Mon, 12 Feb 2001 15:51:58 -0500 > > > >On Mon,
>Feb 12, 2001 at 01:13:21PM -0600, Thomas Muldowney wrote: > > > It's
>possible that it's legacy code from 1.2, but I'm not sure. It was > >missed
> > > > by all of us as jabber.org runs in scripts to capture all the debug
> > >output, we > > > apologize. > > > > > > --temas > > > >this one has to
>do with linking two jabberd's together.. it was put in as a > >way > >for
>the child process to know when it is supposed to exit (when the parent >
> >process > >exits). > > > >you should ONLY be using a flag in a config
>file that is to be > >'d > >inside of another PARENT jabberd. > > > >There
>is another section where it checks it's PID, and that is in dnsrv.. a >
> >similar > >instance is when dnsrv is used, the process forks itself, to
>run a child > >dnsrv > >module. This child process also checks it's parent
>PID to see if it > >changes to 1, > >then exits if it does. > > > >This has
>worked for some time, and is only meant to happen in those two > >very
>distinct > >instances.. if you are running a single jabberd, and have a
>flag > >inside > >of it, then that is WRONG, and you need to take that flag
>out.. > >that is > >only meant to be used while linking jabberd's together
>with a config > >section such as: > >./jabberd/jabberd -c ./jabber2.xml > >
> > >Please check your config for errors, thank you! > > > >also, if there
>is an easier/better way for a child process to check if its > >parent >
> >has died, I'd love to change this code... I've looked in a lot of places
> > >for code > >that accomplishes this, with no luck... this was the best I
>could do in > >short notice, > >and it fixed all of our "zombie" jabberd
>problems. > > > >Keith Minkler > > > > > > > > On Mon, Feb 12, 2001 at
>09:34:04AM -0800, james rogers wrote: > > > > In the
>jabber-1.4RC/jabberd/base direcrtory in a file called > >base_stdout.c on
>line 51 is the function that was added for jabberd version > >1.4 (i.e. not
>found in jabberd 1.2). This is the function that is needless > >and causing
>the server to exit when it's parent process is changed.o > > > > > > > >
>Here it is: > > > > > > > > result base_stdout_heartbeat(void *arg) > > > >
>{ > > > > static int parent = 0; > > > > > > > > if(parent == 0) parent =
>getppid(); > > > > > > > > if(parent != getppid()) > > > > { > > > > /*
>parent pid has changed, bail */ > > > > log_alert("stdout","Parent PID has
>changed, Server Exiting"); > > > > exit(1); > > > > } > > > > > > > >
>return r_DONE; > > > > } > > > > > > > > I am guessing that if we change it
>to the following that we will keep > >running when we logout of the
>shell... > > > > > > > > result base_stdout_heartbeat(void *arg) > > > > {
> > > > > return r_DONE; > > > > } > > > > > > > > But before I do this in
>my own installation... Why was this check > >added? What are we actually
>checking for here and is there another way to > >do the same check? > > > >
> > > > > > > > > ___________________________________________________ > > >
> > GO.com Mail > > > > Get Your Free, Private E-mail at http://mail.go.com
> > > > > > > > > > > > > > > > >
>_______________________________________________ > > > > jdev mailing list >
> > > > jdev at jabber.org > > > > http://mailman.jabber.org/listinfo/jdev > >
> > > > ><< attach3 >> > >
>_________________________________________________________________ > Get
>your FREE download of MSN Explorer at http://explorer.msn.com > > >
>_______________________________________________ > jdev mailing list >
>jdev at jabber.org > http://mailman.jabber.org/listinfo/jdev << attach3 >>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
More information about the JDev
mailing list