summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.lockd
diff options
context:
space:
mode:
authorghelmer <ghelmer@FreeBSD.org>2003-04-24 14:38:42 +0000
committerghelmer <ghelmer@FreeBSD.org>2003-04-24 14:38:42 +0000
commite8b73631ee3ec568e4151c424cab891cec5a02ec (patch)
tree686532740e429265cf7d1341af0a5ccfad7185bd /usr.sbin/rpc.lockd
parent571d62789f1495323131b014257be425e8a587bc (diff)
downloadFreeBSD-src-e8b73631ee3ec568e4151c424cab891cec5a02ec.zip
FreeBSD-src-e8b73631ee3ec568e4151c424cab891cec5a02ec.tar.gz
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
Diffstat (limited to 'usr.sbin/rpc.lockd')
-rw-r--r--usr.sbin/rpc.lockd/lockd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c
index db8b669..b5256bc 100644
--- a/usr.sbin/rpc.lockd/lockd.c
+++ b/usr.sbin/rpc.lockd/lockd.c
@@ -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;
OpenPOWER on IntegriCloud