[Bug 3049] ssh startup time on OSX is linear to _SC_OPEN_MAX
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Fri Aug 2 11:01:38 AEST 2019
https://bugzilla.mindrot.org/show_bug.cgi?id=3049
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #3305|0 |1
is obsolete| |
Status|NEW |ASSIGNED
Assignee|unassigned-bugs at mindrot.org |djm at mindrot.org
Attachment #3306| |ok?(dtucker at dtucker.net)
Flags| |
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
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.
More information about the openssh-bugs
mailing list