Safe HaskellNone



Executing jobs as processes

The protocol works as follows (MP = master process, FP = forked process):

  • MP sets its own livelock as the livelock of the job to be executed.
  • FP creates its own lock file and sends its name to the MP.
  • MP updates the lock file name in the job file and confirms the FP it can start.
  • FP requests any secret parameters.
  • MP sends the secret parameters, if any.
  • Both MP and FP close the communication channel.


forkJobProcess Source #


:: (Error e, Show e) 
=> QueuedJob

a job to process

-> FilePath

the daemons own livelock file

-> (FilePath -> ResultT e IO ())

a callback function to update the livelock file and process id in the job file

-> ResultT e IO (FilePath, ProcessID) 

Forks the job process and starts processing of the given job. Returns the livelock of the job and its process ID.