sub restart { my $self = shift; my $good_data = shift; sleep 1; kill('SIGTERM', @{$self->chld_processes}); for my $pid (@{$self->chld_processes}) { waitpid($pid, 0); } exec($^X, $0, $ARGV[0], $good_data); exit 0; }