diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-08-07 20:13:49 +0200 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-08-13 11:21:13 +0200 |
commit | 065de90380c88d9fcc116627f714bed9984c2723 (patch) | |
tree | 79061a2699e0dc3e87c218b3b57c2f0577d5a69a /isisd | |
parent | bgp: missing pieces from listener patch (diff) | |
download | frr-065de90380c88d9fcc116627f714bed9984c2723.tar.xz frr-065de90380c88d9fcc116627f714bed9984c2723.zip |
all: check return value from daemon() call
* */*main.c: (main) Current versions of Gcc warn if the return value for
daemon() is not checked. So add a simple test and exit on failure.
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/isis_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/isisd/isis_main.c b/isisd/isis_main.c index 2411518d8..c5e824c19 100644 --- a/isisd/isis_main.c +++ b/isisd/isis_main.c @@ -333,8 +333,11 @@ main (int argc, char **argv, char **envp) return(0); /* demonize */ - if (daemon_mode) - daemon (0, 0); + if (daemon_mode && daemon (0, 0) < 0) + { + zlog_err("ISISd daemon failed: %s", strerror(errno)); + exit (1); + } /* Process ID file creation. */ pid_output (pid_file); |