aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-04-18 00:57:17 +0000
committerRoy Marples <roy@marples.name>2009-04-18 00:57:17 +0000
commit657cb3a6eb084d15121772ec13e9692a319c6fde (patch)
tree884b0528c994de7115efa689bf8df9aff1a0d410 /src
parent9225c6cefbc5c7f211bcc7ffefb63637d1fab29f (diff)
Fix compile on FreeBSD.
Diffstat (limited to 'src')
-rw-r--r--src/rc/runscript.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 1fd9e9ab..20b14ae4 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -34,6 +34,7 @@
#include <sys/file.h>
#include <sys/param.h>
#include <sys/stat.h>
+#include <sys/wait.h>
#include <ctype.h>
#include <dlfcn.h>
@@ -529,39 +530,6 @@ svc_wait(const char *svc)
return false;
}
-static RC_SERVICE
-svc_status(void)
-{
- char status[10];
- int (*e) (const char *fmt, ...) EINFO_PRINTF(1, 2) = einfo;
- RC_SERVICE state = rc_service_state(service);
-
- if (state & RC_SERVICE_STOPPING) {
- snprintf(status, sizeof(status), "stopping");
- e = ewarn;
- } else if (state & RC_SERVICE_STARTING) {
- snprintf(status, sizeof(status), "starting");
- e = ewarn;
- } else if (state & RC_SERVICE_INACTIVE) {
- snprintf(status, sizeof(status), "inactive");
- e = ewarn;
- } else if (state & RC_SERVICE_STARTED) {
- errno = 0;
- if (_rc_can_find_pids() &&
- rc_service_daemons_crashed(service) &&
- errno != EACCES)
- {
- snprintf(status, sizeof(status), "crashed");
- e = eerror;
- } else
- snprintf(status, sizeof(status), "started");
- } else
- snprintf(status, sizeof(status), "stopped");
-
- e("status: %s", status);
- return state;
-}
-
static void
get_started_services(void)
{