[JDEV] Parent PID changed, exiting...

Thomas Muldowney temas at box5.net
Mon Feb 12 13:13:21 CST 2001


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

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20010212/7cd8855b/attachment-0002.pgp>


More information about the JDev mailing list