<div dir="ltr"><div></div><div>I'm not familiar with forkProcess.<br></div><div><br></div><div>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.  <a href="https://www.youtube.com/watch?v=T5y8sFmCFnA">https://www.youtube.com/watch?v=T5y8sFmCFnA</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 17, 2018 at 4:48 AM, PICCA Frederic-Emmanuel <span dir="ltr"><<a href="mailto:frederic-emmanuel.picca@synchrotron-soleil.fr" target="_blank">frederic-emmanuel.picca@synchrotron-soleil.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I try to write a service which execute an IO using forkProcess<br>
This service contain a web server whcih avwait for job published by users.<br>
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.<br>
<br>
I have a least two questions<br>
<br>
1) is this forkProcess a fork of all the current process, or is it just an executin of the IO in another process id ?<br>
<br>
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.<br>
<br>
2 ) How can I catch the exceptions thrown from the child process in order to process them in the parent process.<br>
<br>
thanks for your help answering these questions.<br>
<br>
<br>
Frederic<br>
______________________________<wbr>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
</blockquote></div><br></div>