https://bugzilla.mindrot.org/show_bug.cgi?id=3049
Damien Miller <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3305|0 |1 is obsolete| | Status|NEW |ASSIGNED Assignee|[email protected] |[email protected] Attachment #3306| |ok?([email protected]) Flags| | --- Comment #1 from Damien Miller <[email protected]> --- Created attachment 3306 --> https://bugzilla.mindrot.org/attachment.cgi?id=3306&action=edit refactor, add fallback Thanks for the patch. I think there were two problems in your original implementation: 1) if the fd table size changed between the size-query proc_pidinfo() and the call to obtain the fd map then the code would just bail out without closing anything 2) likewise, for other errors (e.g. malloc failure) - it's better to fall back to brute-force closing all fds than doing nothing. I've refactored the closefrom implementation to do both these, with a closefrom_fallback() doing the brute-force closure, and sharing this with the /proc/pid/fd strategy. I'm not in from of an OSX machine right now, so please test. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug. _______________________________________________ openssh-bugs mailing list [email protected] https://lists.mindrot.org/mailman/listinfo/openssh-bugs
