It's somewhat hard to tell without the full context ... but just one idea to get the discussion going :) Are you checking the return value of the accept() call? In some circumstances, accept may return undef (without having gotten any connection attempt, that is). In case of EINTR ($! eq "Interrupted system call") you just have to call accept again. This is more of an issue on some platforms (e.g. AIX) than on others (Linux), because some may automatically resume interrupted system calls — but in case of doubt, be prepared to handle it yourself... (Google for '"interrupted system call" EINTR accept' (or some such) for more background.)
In any case, what I just said would only make sense if the problem is occurring sporadically (I'm not quite sure how to read your "Under certain circumstances"). If it reproducibly occurs with DBConnect_not_ok, then something else will likely be the problem ...
In reply to Re: Mysterious bad file descriptor after fork
by almut
in thread Mysterious bad file descriptor after fork
by gnork
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |