Skip to content

lib: Don't print warning if not a daemon#16542

Merged
ton31337 merged 1 commit intoFRRouting:masterfrom
donaldsharp:vtysh_stupidly_large
Aug 11, 2024
Merged

lib: Don't print warning if not a daemon#16542
ton31337 merged 1 commit intoFRRouting:masterfrom
donaldsharp:vtysh_stupidly_large

Conversation

@donaldsharp
Copy link
Copy Markdown
Member

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

lib/libfrr.c Outdated
return buf;
}

extern bool frr_is_daemon(void)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some compilers may not like that "extern" in the definition?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

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: FRRouting#16516
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
@donaldsharp donaldsharp force-pushed the vtysh_stupidly_large branch from 2b4efde to cecf571 Compare August 8, 2024 19:27
Copy link
Copy Markdown
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good


bool frr_is_daemon(void)
{
if (di)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: return !!di?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are looking at our belly button too much.

@ton31337 ton31337 merged commit 423e807 into FRRouting:master Aug 11, 2024
@donaldsharp donaldsharp deleted the vtysh_stupidly_large branch July 30, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vtysh can't avoid the "stupidly large FD limit" message if system's ulimit is too large

3 participants