Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 11, 2024

Conversation

donaldsharp
Copy link
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
@@ -1474,3 +1474,11 @@ const char *frr_vers2str(uint32_t version, char *buf, int buflen)

return buf;
}

extern bool frr_is_daemon(void)
Copy link
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
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 <[email protected]>
@donaldsharp donaldsharp force-pushed the vtysh_stupidly_large branch from 2b4efde to cecf571 Compare August 8, 2024 19:27
Copy link
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
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
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
11 checks passed
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