Patching druntime to use different signals beside SIGUSR1/SIGUSR2?

Logan Capaldo via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 10 12:54:26 PDT 2014


Apologies in advance if this belongs on the druntime forum, but 
it seemed to be full of exclusively automated posts?

I'm looking to integrate D into an existing code base. So far so 
good, but I'm concerned that the relatively rare but non-zero use 
of SIGUSR1/SIGUSR2 in the code base will, due to murphy's law 
bound to trip something up and put people in a position of having 
a confusing and difficult to debug issue. Fortunately we _do_ 
have a centralized "allocator" for Posix realtime signals. I was 
thinking of adding a int rt_init2(int suspendsigno, int 
resumesigno) function (not looking to bikeshed on the 
name/arguments at the moment, if people find this 
reasonable/useful I will happily have that discussion) as an 
alternative to rt_init(). My questions are basically:

1) I can't think of any reason something would break by making 
this configurable, but I could be mistaken. is there?

2) Is rt_init() the right sort of function, or should it be at 
thread_init time?

3) Is there an existing effort in this direction? I tired 
searching around, but mostly just found evidence that "yes, 
druntime uses sigusr1/sigusr2 as part of the gc implementation on 
!(windows, osx)."

Thanks,
-Logan


More information about the Digitalmars-d mailing list