It's not a true daemon...Mike's comment on using a wait or waitpid is
valid.  If you're interested, read up on daemon processes in APUE (chap.
13) from Stevens.  Your process is still associated with a terminal and
is not the process group leader and is not the session leader.

I highly recommend it if you're going to write daemon processes.

Best of luck,
R

-----Original Message-----
From: Mark [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 23, 2002 02:51 PM
To: Michael T. Babcock
Cc: [EMAIL PROTECTED]
Subject: Re: SOLVED! (was: Re: What is wrong with this query?)


----- Original Message -----
From: "Michael T. Babcock" <[EMAIL PROTECTED]>
To: "Mark" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 23, 2002 8:14 PM
Subject: Re: SOLVED! (was: Re: What is wrong with this query?)

> >It seems that the parent exit-ing while the
> >child is doing stuff, makes the child lose its query to MySQL (always

> >more or less at the same point). And this is really strange; for the
parent
> >has nothing to do with MySQL. It is the child who makes the 
> >connection and does all queries. So, having the parent linger a bit 
> >should have no affect on the child. Yet it does.
> >
> >
>
> I'm not a PERL god, but from C experience, try looking up "wait" and 
> "wait" on your child instead of just exiting.


I do not understand what you mean. This is not a parent process that
uses a "waitpid" to reap its died-off children, but a daemon process
where the parent spawns a stand-alone child, fully dissociated from the
parent by closing STDIN, STDOUT, and setting its own session id, where
the parent can exit as soon as $pid is defined. At least, that is how I
always understood the process.

But in light of recent events, maybe not...

- Mark




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to