Limit dg-xfail-run-if for *-*-hpux11.[012]* to -O0
[official-gcc.git] / libphobos / testsuite / libphobos.gc / startbackgc.d
blobbf51fbdbefeb78ff36f95fe354c7f845a21dbd95
1 // https://issues.dlang.org/show_bug.cgi?id=20270
2 import core.sys.posix.sys.wait : waitpid;
3 import core.sys.posix.unistd : fork, _exit;
4 import core.thread : Thread;
6 void main()
8 foreach (t; 0 .. 10)
9 new Thread({
10 foreach (n; 0 .. 100)
12 foreach (x; 0 .. 100)
13 new ubyte[x];
14 auto f = fork();
15 assert(f >= 0);
16 if (f == 0)
17 _exit(0);
18 else
19 waitpid(f, null, 0);
21 }).start();