ctrl+c and destructors
PauloPinto
pjmlp at progtools.org
Tue Oct 1 04:19:38 PDT 2013
On Tuesday, 1 October 2013 at 08:01:21 UTC, Jacob Carlborg wrote:
> On 2013-10-01 06:54, PauloPinto wrote:
>
>> I would say the main reason is that anyone can replace the
>> current set
>> of signals, thus breaking what might be druntime's signal
>> handling.
>
> If druntime has a default signal handler and the user replaces
> that. It's up to the user to call the original signal handler
> so everything is properly destructed/finalized.
>
> It's the same problem with the GC and all the other handlers
> that druntime has that the user can override.
>
> I would consider these very advanced features and not something
> a user should be fiddling with every day.
I just remember that you also have the added problem that signal
handlers are very limited in what you are allowed to do, with the
set of restrictions and guarantees not being portable across all
POSIX systems.
Specially the tricks of notifying the application a signal has
happened, after signal returns and the whole story of redoing
interrupted system calls.
--
Paulo
More information about the Digitalmars-d
mailing list