Track PID
This commit is contained in:
parent
8dcbcb5fe5
commit
9c5b60d42f
|
@ -13,6 +13,13 @@ my $lat_lon = fetch_lat_lon($location);
|
||||||
|
|
||||||
my $pid = fork;
|
my $pid = fork;
|
||||||
unless ($pid) {
|
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 STDIN, '/dev/null';
|
||||||
open STDOUT, '>>/dev/null';
|
open STDOUT, '>>/dev/null';
|
||||||
open STDERR, '>>/dev/null';
|
open STDERR, '>>/dev/null';
|
||||||
|
|
Loading…
Reference in New Issue