zfs/cmd
наб 5957574694 zed: only go up to current limit in close_from() fallback
Consider the following strace log:
  prlimit64(0, RLIMIT_NOFILE,
            NULL, {rlim_cur=1024, rlim_max=1024*1024}) = 0
  dup2(0, 30)                         = 30
  dup2(0, 300)                        = 300
  dup2(0, 3000)                       = -1 EBADF (Bad file descriptor)
  dup2(0, 30000)                      = -1 EBADF (Bad file descriptor)
  dup2(0, 300000)                     = -1 EBADF (Bad file descriptor)
  prlimit64(0, RLIMIT_NOFILE,
            {rlim_cur=1024*1024, rlim_max=1024*1024}, NULL) = 0
  dup2(0, 30)                         = 30
  dup2(0, 300)                        = 300
  dup2(0, 3000)                       = 3000
  dup2(0, 30000)                      = 30000
  dup2(0, 300000)                     = 300000

Even a privileged process needs to bump its rlimit before being able
to use fds higher than rlim_cur.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11834
2021-11-12 15:24:36 -08:00
..
arc_summary arc_summary3: Handle overflowing value width 2020-12-23 14:34:59 -08:00
arcstat FreeBSD: Update usage of py-sysctl 2020-12-23 14:34:59 -08:00
dbufstat dbufstat: Fix warnings with Python 3.8 2020-12-23 15:11:01 -08:00
fsck_zfs Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
mount_zfs cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
raidz_test cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
vdev_id vdev_id: Add error message when $CONFIG is missing 2021-01-24 16:06:58 -08:00
zdb Fix cross-endian interoperability of zstd 2021-11-12 15:24:36 -08:00
zed zed: only go up to current limit in close_from() fallback 2021-11-12 15:24:36 -08:00
zfs cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zfs_ids_to_path cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zgenhostid cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zhack cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zinject cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zpool cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zstream cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zstreamdump Minor `zstream redup` command fixes 2020-04-10 21:10:09 -07:00
ztest cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zvol_id cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zvol_wait zvol_wait should ignore redacted zvols 2019-11-06 10:51:19 -08:00
Makefile.am cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00