diff options
Diffstat (limited to 't/op')
-rw-r--r-- | t/op/fork.t | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/op/fork.t b/t/op/fork.t index 9fe8107cfa..fc9c58fc06 100644 --- a/t/op/fork.t +++ b/t/op/fork.t @@ -462,3 +462,21 @@ sub { @_ = 3; fork ? die "1\n" : die "1\n" }->(2); EXPECT 1 1 +######## +# [perl #72604] @DB::args stops working across Win32 fork +$|=1; +sub f { + if ($pid = fork()) { + print "waitpid() returned ok\n" if waitpid($pid,0) == $pid; + } + else { + package DB; + my @c = caller(0); + print "child: called as [$c[3](", join(',',@DB::args), ")]\n"; + exit(0); + } +} +f("foo", "bar"); +EXPECT +child: called as [main::f(foo,bar)] +waitpid() returned ok |