Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Signals and external bindings... (umptious)
2. Re: Signals and external bindings... (Brandon Allbery)
----------------------------------------------------------------------
Message: 1
Date: Thu, 3 May 2012 16:48:24 +0100
From: umptious <[email protected]>
Subject: Re: [Haskell-beginners] Signals and external bindings...
Cc: "[email protected]" <[email protected]>
Message-ID:
<cae20bnssff2eosxvdkap-yuevfyei7yde_g7n0vieyir4cc...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On 2 May 2012 19:29, Mike Meyer <[email protected]> wrote:
> On Wed, 2 May 2012 13:46:39 -0400
> Brandon Allbery <[email protected]> wrote:
>
> > On Wed, May 2, 2012 at 1:00 PM, Mike Meyer <[email protected]> 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-0001.htm>
------------------------------
Message: 2
Date: Fri, 4 May 2012 01:12:18 -0400
From: Brandon Allbery <[email protected]>
Subject: Re: [Haskell-beginners] Signals and external bindings...
To: umptious <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID:
<CAKFCL4XDRFAjHis1DREXb_Ld54CQQGD6AJnR6SwWTpQAU=o...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Thu, May 3, 2012 at 11:48 AM, umptious <[email protected]> wrote:
> On 2 May 2012 19:29, Mike Meyer <[email protected]> wrote:
>
>> On Wed, 2 May 2012 13:46:39 -0400
>> Brandon Allbery <[email protected]> wrote:
>>
>> > On Wed, May 2, 2012 at 1:00 PM, Mike Meyer <[email protected]> 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.
>>
>> 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?
>
What problem do you think this is solving? Because it isn't solving the
problem with the Haskell runtime being unable to clean up the internal
state of arbitrary C code, which is the reason C code is run the way it is
by most other environments.
--
brandon s allbery [email protected]
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120504/c3f3b3b6/attachment-0001.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 47, Issue 3
****************************************