[JDEV] Parent PID changed, exiting...

james rogers buckrogers1965 at go.com
Mon Feb 12 11:34:04 CST 2001


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






More information about the JDev mailing list