| 2 |
## $Id$ |
## $Id$ |
| 3 |
## --------------------------------------------------------------------------- |
## --------------------------------------------------------------------------- |
| 4 |
## $Log$ |
## $Log$ |
| 5 |
|
## Revision 1.18 2003/12/05 04:58:04 joko |
| 6 |
|
## + minor update: doesn't require IPC::Session anymore |
| 7 |
|
## |
| 8 |
|
## Revision 1.17 2003/07/02 11:17:32 jonen |
| 9 |
|
## minor changes |
| 10 |
|
## |
| 11 |
## Revision 1.16 2003/06/25 22:49:56 joko |
## Revision 1.16 2003/06/25 22:49:56 joko |
| 12 |
## RUNNING_IN_HELL mode for detach option |
## RUNNING_IN_HELL mode for detach option |
| 13 |
## |
## |
| 87 |
use Carp; |
use Carp; |
| 88 |
|
|
| 89 |
# NEW - 2003-06-23 for Linux (what about *BSD?) |
# NEW - 2003-06-23 for Linux (what about *BSD?) |
| 90 |
use IPC::Session; |
#use IPC::Session; |
| 91 |
|
|
| 92 |
use File::Spec; |
use File::Spec; |
| 93 |
use Proc::Background; |
use Proc::Background; |
| 334 |
my $proc1 = Proc::Background->new(@cmd); |
my $proc1 = Proc::Background->new(@cmd); |
| 335 |
print "pid: ", $proc1->pid(), "\n"; |
print "pid: ", $proc1->pid(), "\n"; |
| 336 |
} else { |
} else { |
| 337 |
print STDERR "run_cmd[detach]: system('$cmd' &).", "\n"; |
print STDOUT "run_cmd[detach]: system('$cmd' &).", "\n"; |
| 338 |
system($cmd . ' &'); |
system($cmd . ' &'); |
| 339 |
} |
} |
| 340 |
|
|
| 341 |
} else { |
} else { |
| 342 |
print STDOUT "run_cmd: system('$cmd').", "\n"; |
print STDOUT "run_cmd: system('$cmd').", "\n"; |
| 343 |
|
#print $ENV{PERL5LIB}, "\n"; |
| 344 |
system($cmd); |
system($cmd); |
| 345 |
} |
} |
| 346 |
|
|