feedback from system() etc. calls?

This is a discussion on feedback from system() etc. calls? within the Perl forums in Programming Languages category; I use perl quite often as a glue to tie together command line tools under Linux. Recently I have been using tools that have substantial run times. IN light of this, some of the tools output progress reports, either as moving bars, or just messages at key stages. At the moment, sadly, I only get these messages when the command has finished, which is not so pleasant; I would like to see them as they are generated. Has anyone got a variant of system, popen etc that has worked through the various issues of buffering, differentiating STDOUT, SDTERR etc? Security ...

Go Back   Application Development Forum > Programming Languages > Perl

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-08-2008, 05:27 AM
bugbear
Guest
 
Default feedback from system() etc. calls?

I use perl quite often as a glue to tie together
command line tools under Linux.

Recently I have been using tools that have substantial
run times.

IN light of this, some of the tools output progress
reports, either as moving bars, or just messages
at key stages.

At the moment, sadly, I only get these
messages when the command has finished,
which is not so pleasant; I would like to
see them as they are generated.

Has anyone got a variant
of system, popen etc that has
worked through the various issues
of buffering, differentiating STDOUT, SDTERR etc?

Security is not an issue for me; these scripts
are running stand alone from the command line.

BugBear
Reply With Quote
  #2  
Old 09-08-2008, 06:02 AM
Joost Diepenmaat
Guest
 
Default Re: feedback from system() etc. calls?

bugbear <bugbear@trim_papermule.co.uk_trim> writes:

> Has anyone got a variant
> of system, popen etc that has
> worked through the various issues
> of buffering, differentiating STDOUT, SDTERR etc?


This might be considered overkill, but POE::Wheel::Run does more
or less everything you might want.

http://poe.perl.org/?POE_Cookbook/Child_Processes

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:47 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.