Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: forkProcess behaviour (Michael Snoyman) 2. Re: forkProcess behaviour (PICCA Frederic-Emmanuel) 3. Re: forkProcess behaviour (Michael Snoyman) ---------------------------------------------------------------------- Message: 1 Date: Wed, 25 Jul 2018 11:23:25 +0300 From: Michael Snoyman <mich...@snoyman.com> To: Beginners <beginners@haskell.org> Subject: Re: [Haskell-beginners] forkProcess behaviour Message-ID: <cakt9ecpgawedijtopgd19shjqj3runcpzr_lgmwow4uo8qj...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Tue, Jul 24, 2018 at 10:05 AM PICCA Frederic-Emmanuel < frederic-emmanuel.pi...@synchrotron-soleil.fr> wrote: > Hello > > I have done the first solution and call the program changing the command > line in oder to execute each child task. > It works well and I can change the uid gid of these process. > > > For the most part, yes. You may need to reach deeper and use SIGKILL > occasionally, depending on how stubborn the child process is. The `timeout` > will only kill off the parent thread's call to block on the child's exit > code. > > Since all these tasks are executing also child process via other system > cals. > So I have a hyerarchy of process. > > Do you know how to manage that sort of things if something goes wrong and > I need to kill the first child and all its children's ? > Is it possible for CreateProcess to track all these process and kill them > all on request ? > > Funnily enough, there's another discussion going on about this right now: https://mail.haskell.org/pipermail/haskell-cafe/2018-July/129646.html The basic answer is: * You can create a process group and then kill the whole process group * But a misbehaving program would still be able to escape it by creating its own process group, only something like cgroups can be fully reliable here > > Yes, you should avoid forkProcess in this case, it will have > unpredictable and confusing results. > > I take you advices seriously and now I start to build something (I hope) > more robust. > > Thansk > > Frédéric > _______________________________________________ > Beginners mailing list > Beginners@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/20180725/01a67810/attachment-0001.html> ------------------------------ Message: 2 Date: Wed, 25 Jul 2018 08:26:47 +0000 From: PICCA Frederic-Emmanuel <frederic-emmanuel.pi...@synchrotron-soleil.fr> To: "The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell" <beginners@haskell.org> Subject: Re: [Haskell-beginners] forkProcess behaviour Message-ID: <a2a20ec3b8560d408356cac2fc148e530107e2d...@sun-dag4.synchrotron-soleil.fr> Content-Type: text/plain; charset="us-ascii" > Funnily enough, there's another discussion going on about this right now: > https://mail.haskell.org/pipermail/haskell-cafe/2018-July/129646.html :)) > The basic answer is: > * You can create a process group and then kill the whole process group > * But a misbehaving program would still be able to escape it by creating its > own process group, only something like cgroups can be fully reliable here My server will be managed via systemd, so I hope that it will be able to managed this when restarting. Is there an haskell API in order to work with cgoups ? Cheers Fred ------------------------------ Message: 3 Date: Wed, 25 Jul 2018 11:28:05 +0300 From: Michael Snoyman <mich...@snoyman.com> To: Beginners <beginners@haskell.org> Subject: Re: [Haskell-beginners] forkProcess behaviour Message-ID: <CAKT9ecNvGJ=0e3=81D-nSd7pSV1z1pTvd=852vhsbcumrq8...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Wed, Jul 25, 2018 at 11:27 AM PICCA Frederic-Emmanuel < frederic-emmanuel.pi...@synchrotron-soleil.fr> wrote: > > Funnily enough, there's another discussion going on about this right now: > > > https://mail.haskell.org/pipermail/haskell-cafe/2018-July/129646.html > > > :)) > > > The basic answer is: > > > * You can create a process group and then kill the whole process group > > * But a misbehaving program would still be able to escape it by creating > its own process group, only something like cgroups can be fully reliable > here > > My server will be managed via systemd, so I hope that it will be able to > managed this when restarting. > Is there an haskell API in order to work with cgoups ? > > None that I'm aware of. > Cheers > > Fred > _______________________________________________ > Beginners mailing list > Beginners@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/20180725/22fce499/attachment-0001.html> ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 121, Issue 20 ******************************************