##
eval {
alarm $timeout;
$result = `$solver $file`;
waitpid($pid, 0);
};
####
my $pid = fork();
die "failed to fork" unless defined $pid;
if ($pid) {
# we are parent. do things
} else {
# we are child. do other things
}