Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sendmail fork, and pipes closed too early?

3 views
Skip to first unread message

e...@gaute.vetsj.com

unread,
May 24, 2017, 4:28:09 AM5/24/17
to
Hi,

I am debugging an issue for an e-mail client I am authoring [0]. The user is using `sendmail` to deliver e-mail in this case, and is experiencing on rare occasions that only partial e-mails are delivered. I do not think this is a bug in postfix, but I am wondering how `sendmail` works:

a) does sendmail fork and continue processing of the stdin input e-mail in the background somehow?

b) I `waitpid` for the `sendmail` process, but if the original pipes (stdin, stdout, stderr) are closed and the background process is not finished, what will happen?

c) should I rather/also wait for EOF on stdout / stderr?


Best regards,
Gaute


[0] https://github.com/astroidmail/astroid
0 new messages