creatur 5.9.5 → 5.9.6
raw patch · 3 files changed
+19/−8 lines, 3 filesdep +hsyslogdep ~MonadRandomdep ~QuickCheckdep ~timePVP ok
version bump matches the API change (PVP)
Dependencies added: hsyslog
Dependency ranges changed: MonadRandom, QuickCheck, time, zlib
API changes (from Hackage documentation)
+ ALife.Creatur.Daemon: launchInteractive :: Job s -> s -> IO ()
Files
- LICENSE +1/−1
- creatur.cabal +9/−7
- src/ALife/Creatur/Daemon.hs +9/−0
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2010-2012, Amy de Buitléir+Copyright (c) Amy de Buitléir 2010-2015 All rights reserved. Redistribution and use in source and binary forms, with or without
creatur.cabal view
@@ -1,5 +1,5 @@ Name: creatur-Version: 5.9.5+Version: 5.9.6 Stability: experimental Synopsis: Framework for artificial life experiments. Description: A software framework for automating experiments@@ -36,7 +36,7 @@ source-repository this type: git location: https://github.com/mhwombat/creatur.git- tag: 5.9.5+ tag: 5.9.6 library GHC-Options: -Wall -fno-warn-orphans@@ -78,16 +78,17 @@ filepath ==1.4.*, gray-extended ==1.*, hdaemonize ==0.5.*,- MonadRandom ==0.3.*,+ hsyslog ==2.0,+ MonadRandom ==0.4.*, mtl ==2.2.*, old-locale ==1.0.*, process ==1.2.*, random ==1.1.*, split ==0.2.*,- time ==1.4.* || ==1.5.*,+ time ==1.5.*, transformers ==0.4.*, unix ==2.7.*,- zlib ==0.5.*+ zlib ==0.6.* Test-suite creatur-tests Type: exitcode-stdio-1.0@@ -102,14 +103,15 @@ creatur, directory ==1.2.*, filepath ==1.4.*,+ hsyslog ==2.0, HUnit ==1.2.*,- MonadRandom ==0.3.*,+ MonadRandom ==0.4.*, mtl ==2.2.*, temporary ==1.2.*, test-framework ==0.8.*, test-framework-hunit ==0.3.*, test-framework-quickcheck2 ==0.3.*,- QuickCheck ==2.7.* || ==2.8.*+ QuickCheck ==2.8.* Other-modules: ALife.Creatur.ChecklistQC ALife.Creatur.CounterQC ALife.Creatur.Database.CachedFileSystemQC
src/ALife/Creatur/Daemon.hs view
@@ -19,6 +19,7 @@ CreaturDaemon(..), simpleDaemon, launch,+ launchInteractive, requestShutdown ) where @@ -32,6 +33,7 @@ import qualified System.Posix.Daemonize as D import System.Posix.Signals (Handler(Catch), fullSignalSet, installHandler, sigTERM)+import System.Posix.Syslog (Priority(Warning), syslog) import System.Posix.User (getLoginName, getRealUserID) termReceived :: MVar Bool@@ -77,6 +79,12 @@ u <- defaultToLoginName (D.user . daemon $ d) D.serviced $ (daemon d) { D.user = u } +launchInteractive :: Job s -> s -> IO ()+launchInteractive j s = do+ s' <- onStartup j s+ daemonMain j s' ()+ return ()+ defaultToLoginName :: Maybe String -> IO (Maybe String) defaultToLoginName (Just "") = fmap Just getLoginName defaultToLoginName x = return x@@ -103,6 +111,7 @@ wrap t = catch t (\e -> do let err = show (e :: SomeException)+ syslog Warning ("Unhandled exception: " ++ err) hPutStr stderr ("Unhandled exception: " ++ err) return ())