This commit is contained in:
huchaogithup 2025-04-29 16:22:43 +00:00 committed by GitHub
commit 509fff6961
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1217,7 +1217,7 @@ void frr_run(struct event_loop *loop)
daemon_ctl_sock, &daemon_ctl_thread);
}
} else if (di->daemon_mode) {
int nullfd = open("/dev/null", O_RDONLY | O_NOCTTY);
int nullfd = open("/dev/null", O_RDWR | O_NOCTTY);
if (nullfd == -1) {
flog_err_sys(EC_LIB_SYSTEM_CALL,
"%s: failed to open /dev/null: %s",