If so, you should at least make sure you set $^F to whatever is the correct value for your program, otherwise the exec()d child will not receive the database handle (since close-on-exec will - probably - be set) update: this may have no effect if the database socket is actually open()ed by C library code instead of perl code.
Also, the child program should be written to support the notion of an inherited database handle - many database-using programs aren't - they just open their own connection.
The integer you're looking for my be the fileno() of the database connection socket, but don't ask me how to get at that portably (or even non-portably).
Or maybe I'm completely misinterpreting your question. It happens.
update 2: from the DBI docs, it appears that child processes may inherit the database handle across a fork(), but 1) it says nothing about exec() and 2) it notes that some databases don't support doing that.
In reply to Re: DB connection after fork, exec
by Joost
in thread DB connection after fork, exec
by bkchapin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |