in reply to Best way to make a script run persistently (daemon)

One additional mention that I don't often see in the literature in case you have some backend action going on: I have found that often after a fork I have to reconnect all my database handles. For some reason they frequently don't seem to survive the fork.

Hope this helps :-)

  • Comment on Re: Best way to make a script run persistently (daemon)

Replies are listed 'Best First'.
Re: Re: Best way to make a script run persistently (daemon)
by runrig (Abbot) on Oct 09, 2001 at 00:52 UTC
    If you read up on the InactiveDestroy database handle attribute, you'd know that forked processes should not share a database handle, and some databases won't even pass a db handle across a fork. If a child process needs a db handle, then you should connect in the child process.