Changeset 22518 for main/trunk/greenstone2/bin/script/classinfo.pl
- Timestamp:
- 2010-07-28T15:06:55+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/classinfo.pl
r21292 r22518 214 214 } 215 215 else { 216 217 # this causes us to automatically send output to a pager, if one is 218 # set, AND our output is going to a terminal 219 # active state perl on windows doesn't do open(handle, "-|"); 220 if ($ENV{'GSDLOS'} !~ /windows/ && -t STDOUT) { 221 my $pager = $ENV{"PAGER"}; 222 if (! $pager) {$pager="(less || more)"} 223 my $pid = open(STDIN, "-|"); # this does a fork... see man perlipc(1) 224 if (!defined $pid) { 225 gsprintf(STDERR, "pluginfo.pl - can't fork: $!"); 226 } else { 227 if ($pid != 0) { # parent (ie forking) process. child gets 0 228 exec ($pager); 229 } 230 } 231 open(STDERR,">&STDOUT"); # so it's easier to pipe output 232 } 233 216 234 &gsprintf(STDERR, "\n{classinfo.passing_options}\n\n"); 217 235 &gsprintf(STDERR, "{classinfo.option_types}:\n\n");
Note:
See TracChangeset
for help on using the changeset viewer.