zfs/include/sys
наб 10b575d04c lib/: set O_CLOEXEC on all fds
As found by
  git grep -E '(open|setmntent|pipe2?)\(' |
    grep -vE '((zfs|zpool)_|fd|dl|lzc_re|pidfile_|g_)open\('

FreeBSD's pidfile_open() says nothing about the flags of the files it
opens, but we can't do anything about it anyway; the implementation does
open all files with O_CLOEXEC

Consider this output with zpool.d/media appended with
"pid=$$; (ls -l /proc/$pid/fd > /dev/tty)":
  $ /sbin/zpool iostat -vc media
  lrwx------ 0 -> /dev/pts/0
  l-wx------ 1 -> 'pipe:[3278500]'
  l-wx------ 2 -> /dev/null
  lrwx------ 3 -> /dev/zfs
  lr-x------ 4 -> /proc/31895/mounts
  lrwx------ 5 -> /dev/zfs
  lr-x------ 10 -> /usr/lib/zfs-linux/zpool.d/media
vs
  $ ./zpool iostat -vc vendor,upath,iostat,media
  lrwx------ 0 -> /dev/pts/0
  l-wx------ 1 -> 'pipe:[3279887]'
  l-wx------ 2 -> /dev/null
  lr-x------ 10 -> /usr/lib/zfs-linux/zpool.d/media

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11866
2021-04-11 15:45:59 -07:00
..
crypto Extending FreeBSD UIO Struct 2021-01-20 21:27:30 -08:00
fm
fs
lua
sysevent Avoid installing kernel headers on FreeBSD 2020-06-27 17:40:14 -07:00
zstd
Makefile.am
abd.h
abd_impl.h
aggsum.h
arc.h
arc_impl.h
avl.h
avl_impl.h
bitops.h
blkptr.h
bplist.h
bpobj.h
bptree.h
bqueue.h
btree.h
dataset_kstats.h
dbuf.h
ddt.h
dmu.h
dmu_impl.h
dmu_objset.h
dmu_recv.h
dmu_redact.h
dmu_send.h
dmu_traverse.h
dmu_tx.h
dmu_zfetch.h
dnode.h
dsl_bookmark.h
dsl_crypt.h
dsl_dataset.h
dsl_deadlist.h
dsl_deleg.h
dsl_destroy.h
dsl_dir.h
dsl_pool.h
dsl_prop.h
dsl_scan.h
dsl_synctask.h
dsl_userhold.h
edonr.h
efi_partition.h
frame.h
hkdf.h
metaslab.h
metaslab_impl.h
mmp.h
mntent.h
mod.h
multilist.h
note.h
nvpair.h
nvpair_impl.h
objlist.h
pathname.h
qat.h
range_tree.h
rrwlock.h
sa.h
sa_impl.h
skein.h
spa.h
spa_boot.h
spa_checkpoint.h
spa_checksum.h
spa_impl.h
spa_log_spacemap.h
space_map.h
space_reftree.h
sysevent.h
txg.h
txg_impl.h
u8_textprep.h
u8_textprep_data.h
uberblock.h
uberblock_impl.h
uio_impl.h
unique.h
uuid.h
vdev.h
vdev_disk.h
vdev_draid.h
vdev_file.h
vdev_impl.h
vdev_indirect_births.h
vdev_indirect_mapping.h
vdev_initialize.h
vdev_raidz.h
vdev_raidz_impl.h
vdev_rebuild.h
vdev_removal.h
vdev_trim.h
xvattr.h
zap.h
zap_impl.h
zap_leaf.h
zcp.h
zcp_global.h
zcp_iter.h
zcp_prop.h
zcp_set.h
zfeature.h
zfs_acl.h
zfs_bootenv.h
zfs_context.h
zfs_debug.h
zfs_delay.h
zfs_file.h
zfs_fuid.h
zfs_ioctl.h
zfs_ioctl_impl.h
zfs_onexit.h
zfs_project.h
zfs_quota.h
zfs_racct.h
zfs_ratelimit.h
zfs_refcount.h
zfs_rlock.h
zfs_sa.h
zfs_stat.h
zfs_sysfs.h
zfs_vfsops.h
zfs_vnops.h
zfs_znode.h
zil.h
zil_impl.h
zio.h
zio_checksum.h
zio_compress.h
zio_crypt.h
zio_impl.h
zio_priority.h
zrlock.h
zthr.h
zvol.h
zvol_impl.h