|
definition: |
cpnsStart :: IO ()
cpnsStart = catch startup
(\_ -> addLogLn "FAILURE occurred during startup!" >>
deleteStartupLockfile >>
return Nothing) >>=
maybe (return ()) (cpnsServer [])
where
deleteStartupLockfile = do
lockfile <- getStartupLockFile
addLogLn $ "Removing startup lock file \"" ++ lockfile ++ "\"..."
system $ "/bin/rm -f " ++ lockfile
return ()
startup = do
addLogLn $ "Starting Curry Port Name Server on port " ++
show cpnsSocket ++ "..."
socket <- listenOn cpnsSocket
deleteStartupLockfile
pid <- getPID
addLogLn $ "Curry Port Name Server is ready (PID: "++show pid++")."
return (Just socket)
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{() |-> _}
|
|
name: |
cpnsStart |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
Prelude.IO () |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |