[Haskell-beginners] forkProcess behaviour
David McBride
toad3k at gmail.com
Tue Jul 17 13:53:45 UTC 2018
I'm not familiar with forkProcess.
As for exception handling, with asynchronous exceptions, it's a pretty in
depth topic and I can't say I have any mastery of it. fpcomplete did a
talk recently that I suspect could answer most of your questions.
https://www.youtube.com/watch?v=T5y8sFmCFnA
On Tue, Jul 17, 2018 at 4:48 AM, PICCA Frederic-Emmanuel <
frederic-emmanuel.picca at synchrotron-soleil.fr> wrote:
> Hello,
>
> I try to write a service which execute an IO using forkProcess
> This service contain a web server whcih avwait for job published by users.
> for each job, I create a forkProcess of this job. I need to fork the
> process in order to change the uid and gid of the process for each of the
> job dependencing on who request the job.
>
> I have a least two questions
>
> 1) is this forkProcess a fork of all the current process, or is it just an
> executin of the IO in another process id ?
>
> I ask this because sometime one of my job hang and a process keep running.
> Since the original process is binded to a port, it is not possible to
> restart the server, saying that the port is already in use.
>
> 2 ) How can I catch the exceptions thrown from the child process in order
> to process them in the parent process.
>
> thanks for your help answering these questions.
>
>
> Frederic
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20180717/cb77e1cc/attachment.html>
More information about the Beginners
mailing list