[Bug 43902] New: close() on a closed fd should set errno to EBADF
wine-bugs at winehq.org
wine-bugs at winehq.org
Thu Oct 19 18:00:01 CDT 2017
https://bugs.winehq.org/show_bug.cgi?id=43902
Bug ID: 43902
Summary: close() on a closed fd should set errno to EBADF
Product: Wine
Version: 2.0.2
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: msvcrt
Assignee: wine-bugs at winehq.org
Reporter: olly at survex.com
Distribution: ---
Created attachment 59529
--> https://bugs.winehq.org/attachment.cgi?id=59529
Fix and regression test
Calling close() on an already closed fd should set errno to EBADF - currently
it doesn't set errno at all, which I discovered because it causes Xapian's test
suite to fail when run under wine (one testcase calls close(fd) and checks for
EBADF as a way to confirm that fd has indeed already been closed).
I've attached a patch with a fix and a regression testcase. It's against
2.0.2, but inspecting the latest code shows the bug to still be present.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list