> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Spitzer, Andy (BL60:9D30) > Sent: Tuesday, September 30, 2008 1:36 PM > To: Lawrence, Scott (BL60:9D30) > Cc: [EMAIL PROTECTED] > Subject: Re: [sipX-dev] sipXportLib - osProcessLinux - change > suggestions > > Woof! > > On Tue, 30 Sep 2008 12:53:31 -0400, Scott Lawrence > <[EMAIL PROTECTED]> wrote: > > > The sipXsupervisor needs to get the status of running the > configtest > > as a child process. > > Perhaps a simple pipe() between the two processes as a means > of sending back status. Let configtest write the status to > stdout, and sipXsupervisor can read it. > > > Surely we can find a way to put the correct default signal > handling in > > sipXcommserverLib somewhere (SipXecsService?). > > Well, I recently changed the signal handling model, and at > that time while each "signal thread" was similar to the > others, none of them were identical. I didn't see a good way > to abstract that all out, or I would have done so at the > time. Doesn't mean it cannot be done. I'm just pointing out > the amount of effort involved spans more than just sipXsupervisor. > > --Woof! > The current implementation of launch/wait in OsProcessLinux could never work, I think, because ignoring the SIGCHLD signal means that waitpid only ever returns 0 or -1, never the pid of the child. OsProcessLinux::wait() will never return.
The only place in our code base which I could find that calls launch/wait is in VerifyProcess in processXmlCommon.cpp. Since none of our process definition files specify a verify command, I think this code is never activated. What Raymond and I are proposing is to modify the OsProcess::launch to NOT ignore the SIGCHLD, and add a case into sig_routine in sipXsupervisor to ignore it there. I don't see how this affects any other process. We will (eventually) want a pipe between the processes to capture stdout/stderr for logging purposes, and to send output to sipXconfig, but this is not in scope at the moment. Altering configtest to write the status to stdout also would require changes in many places and seems like a kludgy solution to me - we really want the exit status. Carolyn _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
