$SIG{TERM} = sub { my $befehl = "kill -15 $pid"; my $result = `$befehl`; print "Beenden"; exit 0; };