Bug 137709
Summary: | "sigwait returned error: 0" errors from milter | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonathan Kamens <jik> | ||||
Component: | sendmail | Assignee: | Thomas Woerner <twoerner> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-07-11 14:17:33 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jonathan Kamens
2004-10-31 04:43:58 UTC
I love it when I file a bug and it hasn't been touched seven months later. I finally got myself a new PC and upgraded to kernel 2.6 for real and permanently, and I was still encountering this problem, so I spent the time to debug it myself. The problem is that the sigwait function on Linux doesn't behave as documented. The man page claims, "The sigwait function never returns an error," but in fact it can return several errors, the relevant one in this case being EINTR. The other problem is that when it returns an error, for some reason errno is still 0. The first problem is a documentation error, the second one is probably a glibc error. I will file separate bugs about those. In the meantime, I have attached a patch to make libmilter function properly. Created attachment 114948 [details]
Cope with linux sigwait ABI
The comment I put in my patch is probably not quite right. It should probably say, "sigwait returns an error code on some Linux versions and doesn't preserve errno." Jakub makes an interesting point in bug 159085. He says that the spec says sigwait isn't supposed to touch errno, that it's supposed to return an error code rather than putting it in errno. That means that the code in libmilter which is checking errno after sigwait returns a non-zero status is completely buggy, not just bubby on Linux -- it should always be using the return value as the error code rather than checking errno. This has been fixed in upstream sendmail. Closing as fixed in "RAWHIDE". |