2 // https://issues.dlang.org/show_bug.cgi?id=20256
4 extern(C
) __gshared string
[] rt_options
= [ "gcopt=parallel:1" ];
10 import core
.sys
.posix
.signal
;
11 import core
.sys
.posix
.unistd
;
17 sigaddset(&m
, SIGHUP
);
19 auto x
= new int[](10000);
20 foreach (i
; 0 .. 10000)
24 GC
.collect(); // GC create thread
26 sigprocmask(SIG_BLOCK
, &m
, null); // block SIGHUP from delivery to main thread
28 auto parent_pid
= getpid();
29 auto child_pid
= fork();
30 assert(child_pid
>= 0);
33 kill(parent_pid
, SIGHUP
); // send signal to parent
37 Thread
.sleep(100.msecs
);
38 // if we are here, then GC threads didn't receive SIGHUP,
39 // otherwise whole process killed