open PID, '>', "$0.$$" or die "can't write pid file: $!";