Changeset 10984 for trunk/gsdl/bin
- Timestamp:
- 2005-12-09T11:35:10+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/pluginfo.pl
r10825 r10984 194 194 } 195 195 196 197 # this causes us to automatically send output to a pager, if one is198 # set, AND our output is going to a terminal199 # active state perl on windows doesn't do open(handle, "-|");200 if ($ENV{'GSDLOS'} !~ /windows/ && -t STDOUT) {201 my $pager = $ENV{"PAGER"};202 if (! $pager) {$pager="(less || more)"}203 my $pid = open(STDIN, "-|"); # this does a fork... see man perlipc(1)204 if (!defined $pid) {205 gsprintf(STDERR, "pluginfo.pl - can't fork: $!");206 } else {207 if ($pid != 0) { # parent (ie forking) process. child gets 0208 exec ($pager);209 }210 }211 open(STDERR,">&STDOUT"); # so it's easier to pipe output212 }213 214 215 196 &main ();
Note:
See TracChangeset
for help on using the changeset viewer.