in reply to DBI lost connection

It would be prudent and helpful if you'd show a full example including the fork code that breaks, so we can easily reproduce and test.

I have code that works fine using the two, but it's very elaborate and would take too much time to post and explain, unless I could compare to what you've got.