I can't reproduce your problem with the code given. The last output of your program goes like this:
11733 started. Got arguments: i2 j2
11734 started. Got arguments: k2 l2
11735 started. Got arguments: m2 n2
11736 started. Got arguments: o2 p2
11737 started. Got arguments: q2 r2
Foobar!
Foobar!
Foobar!
Foobar!
Foobar!
11737 returned 0.
11734 returned 0.
11736 returned 0.
11735 returned 0.
11733 returned 0.
11738 started. Got arguments: s2 t2
11739 started. Got arguments: u2 v2
11740 started. Got arguments: w2 y2
11741 started. Got arguments: x2 z2
Foobar!
Foobar!
Foobar!
Foobar!
and then it terminates as expected.
I'm on v5.8.0 built for i586-linux-thread-multi.