As threatened, here's Test::Fork for easier writing of forked tests.
http://pobox.com/~schwern/src/Test-Fork-0.01_01.tar.gz

           use Test::More tests => 4;
           use Test::Fork;

           fork_ok(2, sub{
               pass("Child");
               pass("Child again");
           });

           pass("Parent");

I'm probably doing the reaping of children wrong.  Someone more familiar with
forking might make some suggestions please.

Also, it's not currently checking whether the system is capable of forking.

And I realize I got the number of tests in the synopsis wrong, it should be 4.

Finally, it might be interesting to use an attribute to declare the number of
tests in the fork, like Test::Class.


-- 
There will be snacks.

Reply via email to