mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 22:12:30 +01:00
d918988baa
- dynamic configuration support - safe process - cleanups - create new suite for fedarated
27 lines
460 B
Perl
27 lines
460 B
Perl
# -*- cperl -*-
|
|
use Test::More qw(no_plan);
|
|
use strict;
|
|
|
|
use_ok ("My::SafeProcess::Base");
|
|
|
|
|
|
my $count= 0;
|
|
for (1..100){
|
|
my $pid= My::SafeProcess::Base::_safe_fork();
|
|
exit unless $pid;
|
|
(waitpid($pid, 0) == $pid) and $count++;
|
|
}
|
|
ok($count == 100, "safe_fork");
|
|
|
|
# A nice little forkbomb
|
|
SKIP: {
|
|
skip("forkbomb", 1);
|
|
eval {
|
|
while(1){
|
|
my $pid= My::SafeProcess::Base::_safe_fork();
|
|
exit unless $pid;
|
|
}
|
|
};
|
|
ok($@, "forkbomb");
|
|
}
|
|
|