[Haskell-beginners] Signals and external bindings...

umptious umptious at gmail.com
Thu May 3 17:48:24 CEST 2012


On 2 May 2012 19:29, Mike Meyer <mwm at mired.org> wrote:

> On Wed, 2 May 2012 13:46:39 -0400
> Brandon Allbery <allbery.b at gmail.com> wrote:
>
> > On Wed, May 2, 2012 at 1:00 PM, Mike Meyer <mwm at mired.org> wrote:
> > You can use wrappers which save the old signal handlers and install new
> > ones which clean up after your plugins and return.  Doing so, and thereby
> > learning the hard way what "clean up after your plugins" entails (unless
> > you were very careful designing and writing them in the first place),
> will
> > teach you why nobody tries to automatically handle it for you.  (In the
> > general case, your plugin has to track *everything* so it can unwind (or
> > commit, as appropriate) memory and resource allocations on signal.)
>
> So unless I'm using something like Qt which can catch the signals and
> run it's own code to call back to my code and then shut itself down,
> I'm pretty much SOL.
>
>    Thanks,
>    <mike
>

What would happen if there was a Haskell process that ran as a
dispatcher/telephone exchange? If this received a message from a C process
and then sent the signal, wouldn't this work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120503/d3520798/attachment.htm>


More information about the Beginners mailing list