summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-04 18:46:54 -0400
committerJoey Hess2014-04-04 18:46:54 -0400
commitddfee66915ab3d4bb1e066e47c7f508a9f0ab2bf (patch)
tree9a8da397221dcf893055c36db8198cd83a5ac5e2 /Propellor/Property
parent66058fdabfea62c03924d30c718f176b0f165479 (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index 0d07f82c..b39b5a1b 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -295,22 +295,22 @@ chain s = case toContainerId s of
Just cid -> do
changeWorkingDirectory localdir
writeFile propellorIdent . show =<< readIdentFile cid
- gogo reapzombies
-- Run boot provisioning before starting simpleSh,
-- to avoid ever provisioning twice at the same time.
whenM (checkProvisionedFlag cid) $ do
let shim = Shim.file (localdir </> "propellor") (localdir </> shimdir cid)
unlessM (boolSystem shim [Param "--continue", Param $ show $ Chain $ fromContainerId cid]) $
warningMessage "Boot provision failed!"
- gogo $ simpleSh $ namedPipe cid
- forever $ do
+ void $ async $ job reapzombies
+ void $ async $ job $ simpleSh $ namedPipe cid
+ job $ do
void $ ifM (inPath "bash")
( boolSystem "bash" [Param "-l"]
, boolSystem "/bin/sh" []
)
putStrLn "Container is still running. Press ^P^Q to detach."
where
- gogo = void . async . forever . void . tryIO
+ job = forever . void . tryIO
reapzombies = void $ getAnyProcessStatus True False
-- | Once a container is running, propellor can be run inside