2 |
## $Id$ |
## $Id$ |
3 |
## --------------------------------------------------------------------------- |
## --------------------------------------------------------------------------- |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.19 2004/05/11 19:45:30 joko |
6 |
|
## now exporting RUNNING_IN_HELL |
7 |
|
## |
8 |
|
## Revision 1.18 2003/12/05 04:58:04 joko |
9 |
|
## + minor update: doesn't require IPC::Session anymore |
10 |
|
## |
11 |
|
## Revision 1.17 2003/07/02 11:17:32 jonen |
12 |
|
## minor changes |
13 |
|
## |
14 |
## Revision 1.16 2003/06/25 22:49:56 joko |
## Revision 1.16 2003/06/25 22:49:56 joko |
15 |
## RUNNING_IN_HELL mode for detach option |
## RUNNING_IN_HELL mode for detach option |
16 |
## |
## |
80 |
get_chomped |
get_chomped |
81 |
bool2status |
bool2status |
82 |
make_guid |
make_guid |
83 |
|
RUNNING_IN_HELL |
84 |
); |
); |
85 |
|
|
86 |
|
|
91 |
use Carp; |
use Carp; |
92 |
|
|
93 |
# NEW - 2003-06-23 for Linux (what about *BSD?) |
# NEW - 2003-06-23 for Linux (what about *BSD?) |
94 |
use IPC::Session; |
#use IPC::Session; |
95 |
|
|
96 |
use File::Spec; |
use File::Spec; |
97 |
use Proc::Background; |
use Proc::Background; |
338 |
my $proc1 = Proc::Background->new(@cmd); |
my $proc1 = Proc::Background->new(@cmd); |
339 |
print "pid: ", $proc1->pid(), "\n"; |
print "pid: ", $proc1->pid(), "\n"; |
340 |
} else { |
} else { |
341 |
print STDERR "run_cmd[detach]: system('$cmd' &).", "\n"; |
print STDOUT "run_cmd[detach]: system('$cmd' &).", "\n"; |
342 |
system($cmd . ' &'); |
system($cmd . ' &'); |
343 |
} |
} |
344 |
|
|
345 |
} else { |
} else { |
346 |
print STDOUT "run_cmd: system('$cmd').", "\n"; |
print STDOUT "run_cmd: system('$cmd').", "\n"; |
347 |
|
#print $ENV{PERL5LIB}, "\n"; |
348 |
system($cmd); |
system($cmd); |
349 |
} |
} |
350 |
|
|