commit fe84ad4c60e2348abc1ac14c4cfe4adfebbbb2b8 from: Alex Arx date: Sun Nov 17 10:19:39 2024 UTC fix fork() code commit - 233429cc630b696b2d0f76eb1a2c8acf672e420c commit + fe84ad4c60e2348abc1ac14c4cfe4adfebbbb2b8 blob - b2d0b0a68b2b4717fc179d70f2544c9f900dd0cb blob + e1ccc0fe7449a403f41c0960ff8349629e63bbb5 --- gpm +++ gpm @@ -7,7 +7,7 @@ use File::Basename; use File::Path 'make_path'; use Getopt::Std; use IPC::Open2; -use POSIX ':sys_wait_h'; +use POSIX qw(setsid); use Text::ParseWords; use Digest::SHA 'sha256'; @@ -250,6 +250,8 @@ sub copy { system $delcmd; die "Fork failed: $!\n"; } elsif ($pid == 0) { + open(STDOUT, '>/dev/null'); + open(STDERR, '>/dev/null'); POSIX::setsid(); sleep $sleep; system($delcmd) if