summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2011-02-28 00:09:12 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2011-02-28 00:09:12 +0000
commit38e8ee5f5e0438c522c36b78fbed5df3b0b245d2 (patch)
treeb5226564c28341bcb62f74a0996c0fea43393124
parentd4b637cd45c42f22514f28167e1ca2ed8a03afe9 (diff)
If 'check script' doesn't exit(), treat the service as 'down' rather
than 'unknown'. Fixes a problem where the script is killed due to expiry of the interval timer. ok pyr@ deraadt@
-rw-r--r--usr.sbin/relayd/check_script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/relayd/check_script.c b/usr.sbin/relayd/check_script.c
index 80f587b70be..fff3998e75a 100644
--- a/usr.sbin/relayd/check_script.c
+++ b/usr.sbin/relayd/check_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: check_script.c,v 1.10 2009/06/05 23:39:51 pyr Exp $ */
+/* $OpenBSD: check_script.c,v 1.11 2011/02/28 00:09:11 sthen Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -156,7 +156,7 @@ script_exec(struct relayd *env, struct ctl_script *scr)
if (WIFEXITED(status))
ret = WEXITSTATUS(status);
else
- ret = -1;
+ ret = 0;
}
done: