repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
c++: lambda capture and explicit object parm
[official-gcc.git]
/
libphobos
/
testsuite
/
libphobos.gc
/
forkgc2.d
blob
38d0d0c2f93e546152205c1340ca655b16c412f7
1
// { dg-skip-if "test hangs the testsuite PR103944" { *-*-darwin* } }
2
import
core
.
stdc
.
stdlib
:
exit
;
3
import
core
.
sys
.
posix
.
sys
.
wait
:
waitpid
;
4
import
core
.
sys
.
posix
.
unistd
:
fork
;
5
import
core
.
thread
:
Thread
;
6
7
void
main
()
8
{
9
foreach
(
t
;
0
..
10
)
10
new
Thread
({
11
foreach
(
n
;
0
..
100
)
12
{
13
foreach
(
x
;
0
..
100
)
14
new ubyte
[
x
];
15
auto
f
=
fork
();
16
assert
(
f
>=
0
);
17
if
(
f
==
0
)
18
exit
(
0
);
19
else
20
waitpid
(
f
,
null
,
0
);
21
}
22
}).
start
();
23
}