summaryrefslogtreecommitdiff
path: root/lib/event.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-08-08 14:58:04 -0400
committerDonald Sharp <sharpd@nvidia.com>2024-08-08 15:26:41 -0400
commitcecf5716d5c8e74aa5afaeec836db624d6f68879 (patch)
tree2e3b880076f83fc7233fb9e6a06e65aae87d555d /lib/event.c
parent7b8ca3e2ed6e7f98a63633c7dc91a9f0d12c576a (diff)
lib: Don't print warning if not a daemon
vtysh will print out the `stupidly large FD limit` upon every run of the program if the ulimit is set stupidly large. Prevent this from being displayed for vtysh. Fixes: #16516 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/event.c')
-rw-r--r--lib/event.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/event.c b/lib/event.c
index f4aa7c58b9..d925d0d5f0 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -555,8 +555,9 @@ struct event_loop *event_master_create(const char *name)
}
if (rv->fd_limit > STUPIDLY_LARGE_FD_SIZE) {
- zlog_warn("FD Limit set: %u is stupidly large. Is this what you intended? Consider using --limit-fds also limiting size to %u",
- rv->fd_limit, STUPIDLY_LARGE_FD_SIZE);
+ if (frr_is_daemon())
+ zlog_warn("FD Limit set: %u is stupidly large. Is this what you intended? Consider using --limit-fds also limiting size to %u",
+ rv->fd_limit, STUPIDLY_LARGE_FD_SIZE);
rv->fd_limit = STUPIDLY_LARGE_FD_SIZE;
}