--- nfo/perl/libs/shortcuts.pm 2003/06/25 22:49:56 1.16 +++ nfo/perl/libs/shortcuts.pm 2004/06/21 14:13:21 1.20 @@ -1,7 +1,19 @@ ## --------------------------------------------------------------------------- -## $Id: shortcuts.pm,v 1.16 2003/06/25 22:49:56 joko Exp $ +## $Id: shortcuts.pm,v 1.20 2004/06/21 14:13:21 jonen Exp $ ## --------------------------------------------------------------------------- ## $Log: shortcuts.pm,v $ +## Revision 1.20 2004/06/21 14:13:21 jonen +## added helper function +## +## Revision 1.19 2004/05/11 19:45:30 joko +## now exporting RUNNING_IN_HELL +## +## Revision 1.18 2003/12/05 04:58:04 joko +## + minor update: doesn't require IPC::Session anymore +## +## Revision 1.17 2003/07/02 11:17:32 jonen +## minor changes +## ## Revision 1.16 2003/06/25 22:49:56 joko ## RUNNING_IN_HELL mode for detach option ## @@ -71,6 +83,8 @@ get_chomped bool2status make_guid + RUNNING_IN_HELL + RUNNING_IN_HEAVEN ); @@ -81,7 +95,7 @@ use Carp; # NEW - 2003-06-23 for Linux (what about *BSD?) -use IPC::Session; +#use IPC::Session; use File::Spec; use Proc::Background; @@ -102,6 +116,7 @@ } sub RUNNING_IN_HELL () { $^O eq 'MSWin32' } +sub RUNNING_IN_HEAVEN () { $^O =~ m/bsd/ } sub get_executable { @@ -328,12 +343,13 @@ my $proc1 = Proc::Background->new(@cmd); print "pid: ", $proc1->pid(), "\n"; } else { - print STDERR "run_cmd[detach]: system('$cmd' &).", "\n"; + print STDOUT "run_cmd[detach]: system('$cmd' &).", "\n"; system($cmd . ' &'); } } else { print STDOUT "run_cmd: system('$cmd').", "\n"; + #print $ENV{PERL5LIB}, "\n"; system($cmd); }