After closing a file descriptor honor the "closed" flag to avoid re-closing it in post-fork processing. File descriptors must be closed during an orphan operation, because the closing of the file-descriptor is necessary for the correct function of code that is polling on the descriptor. Thus even if there are active references, the close() call is necessary. But this means that post-fork code may close the file-descriptor, since it is only unregistered from post-fork after the ref-count reaches 0. All of this can be handled by ensuring that the post-fork code honors the "close" flag.pull/20888/head
parent
bd0d9bb63c
commit
f16fcaacb4
1 changed files with 3 additions and 1 deletions
Loading…
Reference in new issue