On Wed, Apr 02, 2003 at 10:44:24AM +0100, Peter Haworth wrote: > On 02 Apr 2003 10:07:11 +0100, Dirk Koopman wrote: > > Bear in mind that most MTAs fork to handle some of the process, if any > > of the libraries that is currently using have disappeared (they have > > been erased and replacements with different inode nos added), then forks > > will fail. > I can't believe this is true.
It isn't anymore. Most of them, if they fork() at all, will fork() at the accept stage. Exim has some magic with re-exec()ing itself at various points to be able to regain privilege, but this doesn't have to involve forking. The original sendmail used to fork() to handle the various different SMTP commands, (which is why pipelining is an extension to SMTP, and why real RFC821 SMTP *MUST* be lock-step). I don't believe that anything such as this has been done for a very long time, though. They may well fire off auxiliary helpers, of course for pipe deliveries or even for actual local deliveries via, for example mail.local or procmail. TMTATSNBN also involves lots of small processes, so probably fork()s and exec()s in many places. Anyway, getting back to the original point. If this were indeed the case, then there are two issues with Dirk's original post: 1) the inodes will still exist (they will exist until both their link count and their reference count have gone to 0). The unlink() call only decrements the former. :-) 2) if this were indeed the case, then I believe that the sendmail -q would also have failed. -- Lusercop.net - LARTing Lusers everywhere since 2002