| Anonymous | Login | Signup for a new account | 2013-05-20 20:59 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0004895 | OCaml | OCaml general | public | 2009-10-16 02:26 | 2012-02-27 18:15 | |||||||
| Reporter | gerd | |||||||||||
| Assigned To | ||||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 3.11.1 | |||||||||||
| Target Version | Fixed in Version | 3.13.0+dev | ||||||||||
| Summary | 0004895: Windows (mingw): Unix.set/clear_close_on_exec modifies the descriptor | |||||||||||
| Description | The implementation of Unix.set/clear_close_on_exec creates a duplicate of the file handler, and changes the inheritance flag while doing so. The duplication changes the value of the descriptor, and is unnecessary, as Windows now supports changing the inheritance flag directly. E.g. let h = Hashtbl.create 10;; Hashtbl.add h fd "Something";; Unix.set_close_on_exec fd;; Hashtbl.find h fd raises Not_found | |||||||||||
| Additional Information | use the win32 call SetHandleInformation | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0005137) xleroy (administrator) 2009-10-18 10:46 |
SetHandleInformation is a relatively recent addition to Win32 (since Windows 2000 Professional / Server), so at the time this code was written there was probably no other option than duplicating the handle. I guess we can assume everyone has SetHandleInformation nowadays. A (tested) patch would be most welcome. |
|
(0006971) ripoche (reporter) 2012-02-27 14:55 edited on: 2012-02-27 14:57 |
Gerd's proposal matches what was implemented for bug 0005416. And indeed, I was unable to reproduce the issue with the patch applied. (OCaml 3.12.1, Msvc7.1, Windows XP SP3 32bits) |
|
(0006973) xleroy (administrator) 2012-02-27 18:15 |
Very good. I'll mark this PR as resolved, then. Thanks for the notice. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-10-16 02:26 | gerd | New Issue | |
| 2009-10-18 10:46 | xleroy | Note Added: 0005137 | |
| 2009-10-18 10:46 | xleroy | Status | new => feedback |
| 2012-02-27 14:55 | ripoche | Note Added: 0006971 | |
| 2012-02-27 14:57 | ripoche | Note Edited: 0006971 | View Revisions |
| 2012-02-27 18:14 | xleroy | Relationship added | related to 0005416 |
| 2012-02-27 18:15 | xleroy | Note Added: 0006973 | |
| 2012-02-27 18:15 | xleroy | Status | feedback => resolved |
| 2012-02-27 18:15 | xleroy | Resolution | open => fixed |
| 2012-02-27 18:15 | xleroy | Fixed in Version | => 3.13.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |