SIGUSR2 from GC interrupts application system calls on Linux
ikod via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 26 13:10:57 PDT 2016
On Thursday, 26 May 2016 at 19:40:35 UTC, Claude wrote:
> 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);
Will it not hang in the loop if you send it SIGINT?
Looks like not, but is strange for me.
Thanks, will do more testing.
More information about the Digitalmars-d
mailing list