diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-09-03 23:54:26 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-09-03 23:54:26 +0200 |
commit | 6b2a21404d2a4fa2c17c4cf36defe0623016b025 (patch) | |
tree | d06db15fc8e902647c79549c3b443e8dede0080d /trivmix | |
parent | d93226b3ad30e65a607a0ee47acd32de844d312c (diff) | |
download | trivmix-6b2a21404d2a4fa2c17c4cf36defe0623016b025.tar trivmix-6b2a21404d2a4fa2c17c4cf36defe0623016b025.tar.gz trivmix-6b2a21404d2a4fa2c17c4cf36defe0623016b025.tar.bz2 trivmix-6b2a21404d2a4fa2c17c4cf36defe0623016b025.tar.xz trivmix-6b2a21404d2a4fa2c17c4cf36defe0623016b025.zip |
systemd notify
Diffstat (limited to 'trivmix')
-rw-r--r-- | trivmix/Trivmix.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/trivmix/Trivmix.hs b/trivmix/Trivmix.hs index 50caa1b..493c964 100644 --- a/trivmix/Trivmix.hs +++ b/trivmix/Trivmix.hs | |||
@@ -16,6 +16,8 @@ import System.Posix.Types | |||
16 | import System.Environment | 16 | import System.Environment |
17 | import System.Process | 17 | import System.Process |
18 | 18 | ||
19 | import System.Systemd.Daemon (notifyReady) | ||
20 | |||
19 | import Control.Concurrent | 21 | import Control.Concurrent |
20 | import Control.Concurrent.MVar | 22 | import Control.Concurrent.MVar |
21 | import Control.Concurrent.Chan | 23 | import Control.Concurrent.Chan |
@@ -142,6 +144,7 @@ trivmix Options{..} = do | |||
142 | Jack.withActivation client' . Trans.lift $ do | 144 | Jack.withActivation client' . Trans.lift $ do |
143 | forM_ run $ \script -> | 145 | forM_ run $ \script -> |
144 | (callProcess script [client ++ ":" ++ input, client ++ ":" ++ output]) `catch` (\code -> hPutStrLn stderr $ script ++ " failed: " ++ show (code :: ExitCode)) | 146 | (callProcess script [client ++ ":" ++ input, client ++ ":" ++ output]) `catch` (\code -> hPutStrLn stderr $ script ++ " failed: " ++ show (code :: ExitCode)) |
147 | notifyReady | ||
145 | forever $ threadDelay 1000000 | 148 | forever $ threadDelay 1000000 |
146 | 149 | ||
147 | mix :: MVar Level -> CFloat -> IO CFloat | 150 | mix :: MVar Level -> CFloat -> IO CFloat |