]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - contrib/unbound/libunbound/python/doc/examples/example7-1.py
MFV r316873: 7233 dir_is_empty should open directory with CLOEXEC
authorAlexander Motin <mav@FreeBSD.org>
Tue, 20 Feb 2018 20:17:19 +0000 (20:17 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Tue, 20 Feb 2018 20:17:19 +0000 (20:17 +0000)
commitc2e79753fe1689be79dce5097d9ced446a5576f0
tree84c0acdd822b2ee4fdccf72d4c91c577c7e19bad
parent91e16b7e23f0637cb590369ef345116546c7cc78
parent68d57fec79f5dfb431a2d1e38585a87f6e41313b
MFV r316873: 7233 dir_is_empty should open directory with CLOEXEC

illumos/illumos-gate@d420209d9c807f782c1d31f5683be74798142198
https://github.com/illumos/illumos-gate/commit/d420209d9c807f782c1d31f5683be74798142198

https://www.illumos.org/issues/7233
  This fixes a race where one thread is executing zfs_mount() while another
  thread forks and execs. If the fork occurs while the directory is open, the
  child process will inherit (but not necessarily close immediately) the open fd
  for the directory, preventing the mount.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Alex Reece <alex@delphix.com>
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c