init_nsm() is executed after a call to daemon(*, 0), so error and

warning messages should be logged rather than sent to /dev/null.

PR:	bin/45461
This commit is contained in:
ghelmer 2003-04-24 14:38:42 +00:00
parent 571d62789f
commit e8b73631ee

View File

@ -255,7 +255,8 @@ init_nsm(void)
ret = callrpc("localhost", SM_PROG, SM_VERS, SM_UNMON_ALL,
xdr_my_id, &id, xdr_sm_stat, &stat);
if (ret == RPC_PROGUNAVAIL) {
warnx("%lu %s", SM_PROG, clnt_sperrno(ret));
syslog(LOG_WARNING, "%lu %s", SM_PROG,
clnt_sperrno(ret));
sleep(2);
continue;
}
@ -263,7 +264,8 @@ init_nsm(void)
} while (0);
if (ret != 0) {
errx(1, "%lu %s", SM_PROG, clnt_sperrno(ret));
syslog(LOG_ERR, "%lu %s", SM_PROG, clnt_sperrno(ret));
exit(1);
}
nsm_state = stat.state;