=================================================================== RCS file: /cvs/openbsd/OpenBSDTorrents/NewTorrents.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- openbsd/OpenBSDTorrents/NewTorrents.pl 2005/03/28 23:36:44 1.4 +++ openbsd/OpenBSDTorrents/NewTorrents.pl 2005/04/01 01:35:56 1.5 @@ -1,5 +1,5 @@ #!/usr/bin/perl -T -#$Id: NewTorrents.pl,v 1.4 2005/03/28 23:36:44 andrew Exp $ +#$Id: NewTorrents.pl,v 1.5 2005/04/01 01:35:56 andrew Exp $ use strict; use warnings; use diagnostics; @@ -52,18 +52,19 @@ # This actually needs to be a sub that forks off # the generation of this, and the running of the update script. - defined(my $pid = fork) or die "Can't fork: $!"; + #defined(my $pid = fork) or die "Can't fork: $!"; - return if $pid; + #return if $pid; - chdir $HomeDir or die "Can't chdir to $HomeDir: $!"; + #chdir $HomeDir or die "Can't chdir to $HomeDir: $!"; - setsid or die "Can't start a new session: $!"; - #open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; - #open STDOUT, '>/dev/null' - # or die "Can't write /dev/null: $!"; - #open STDERR, '>&STDOUT' or die "Can't dup stdout: $!"; + #setsid or die "Can't start a new session: $!"; + ##open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; + ##open STDOUT, '>/dev/null' + ## or die "Can't write /dev/null: $!"; + ##open STDERR, '>&STDOUT' or die "Can't dup stdout: $!"; print "Making torrents for $dir\n"; - exec($HomeDir . '/regen.sh', "$dir"); + exec($HomeDir . '/regen.sh' . " $dir &"); + #exec($HomeDir . '/regen.sh', "$dir"); }