summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Zeller <mike@mikezeller.net>2020-03-31 15:10:04 -0400
committerMike Zeller <mike@mikezeller.net>2020-03-31 16:07:02 -0400
commita24936cb55a961181e79ce5cc16b5ce8bad4d982 (patch)
treec3309ce18175601ee79d08d1733598849439fff6
parent78a0e8a13427b21a9acb597da969a7921c521e12 (diff)
downloadillumos-joyent-a24936cb55a961181e79ce5cc16b5ce8bad4d982.tar.gz
OS-8150 lx should not report unlimited for max open files
-rw-r--r--usr/src/uts/common/brand/lx/procfs/lx_prvnops.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c
index ba32aaf04e..f6a6aa33ce 100644
--- a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c
+++ b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c
@@ -1730,6 +1730,14 @@ lxpr_read_pid_limits(lxpr_node_t *lxpnp, lxpr_uiobuf_t *uiobuf)
break;
}
}
+ /*
+ * If "Max open files" is still set to RLIM_INFINITY, make it
+ * match the max value so that we do not ouput "unlimited".
+ */
+ if (strcmp(lxpr_rlimtab[i].rlim_name, "Max open files") == 0 &&
+ cur[i] == RLIM_INFINITY)
+ cur[i] = max[i];
+
}
lxpr_unlock(p);