From 8e2fe1673cf1a4330e6f210c366ca505c13b09c2 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Tue, 15 Jan 2008 15:48:20 +0000 Subject: Added delay so that the process has time to start/stop/restart before some other code looks if the process is started/stoped git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@576 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/daemoncontrol.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/daemoncontrol.lua b/lib/daemoncontrol.lua index e7c6e2d..838b039 100644 --- a/lib/daemoncontrol.lua +++ b/lib/daemoncontrol.lua @@ -1,4 +1,5 @@ module (..., package.seeall) +require("posix") function daemoncontrol (process, action) local cmdresult = "" @@ -15,5 +16,6 @@ function daemoncontrol (process, action) else cmdresult = "Unknown command!" end - return {cmdresult=cmdresult, process=process, action=action, } + posix.sleep(2) -- Wait for the process to start|stop + return {cmdresult=cmdresult, process=process, action=action,cmderror=cmderror } end -- cgit v1.2.3