summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-01-15 15:48:20 +0000
committerMika Havela <mika.havela@gmail.com>2008-01-15 15:48:20 +0000
commit8e2fe1673cf1a4330e6f210c366ca505c13b09c2 (patch)
treec6c5cf172355bedeebe648d8bf903f624e30fdfb /lib
parentbe4a346d8bfc8a195d6e8ab5ef40dc84f9b28810 (diff)
downloadacf-core-8e2fe1673cf1a4330e6f210c366ca505c13b09c2.tar.bz2
acf-core-8e2fe1673cf1a4330e6f210c366ca505c13b09c2.tar.xz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/daemoncontrol.lua4
1 files changed, 3 insertions, 1 deletions
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