Track PID

This commit is contained in:
John Mertz 2022-09-17 15:17:28 -04:00
parent 8dcbcb5fe5
commit 9c5b60d42f
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
1 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,13 @@ my $lat_lon = fetch_lat_lon($location);
my $pid = fork;
unless ($pid) {
open(my $fh, ">", $ENV{HOME}."/.spool/gammastep.pid");
print $fh $$;
close($fh);
open($fh, ">", $ENV{HOME}."/.spool/gammastep.status");
print $fh 1;
close($fh);
open STDIN, '/dev/null';
open STDOUT, '>>/dev/null';
open STDERR, '>>/dev/null';