SIGUSR2 from GC interrupts application system calls on Linux

Claude via Digitalmars-d digitalmars-d at puremagic.com
Thu May 26 12:40:35 PDT 2016


On Thursday, 26 May 2016 at 18:44:22 UTC, ikod wrote:
> Is there any recommended workaround for this problem? Is this a 
> bug?

I don't think it's a bug. Even without a GC, on GNU/Linux OS, I 
would enclose the receive function (or any blocking system 
function like poll etc) in a do-while loop testing specifically 
for EINTR. I had the same kind of problem in C.

int r;

do {
     r = s.receive(buffer);
} while (r < 0 && errno == EINTR);


More information about the Digitalmars-d mailing list