>>>>> "GL" == Greg London <Greg> writes: GL> Is there an easy way to tweak backticks so it still captures the GL> output but also tees the output to stdout?
you can pipe a command to tee and save it to a file and also to stdout. the file could be /dev/tty which is the console you can use open "$cmd|" and read the handle line by line. then print each line to stdout and append it to a buffer for processing. GL> also, the command that is hanging, I set an ALRM that has 'die' as its GL> callback. but I end up with the backtick command.running as a zombie GL> process. I have no idea why its doing that. but I dont think I have ever GL> used ALRM either. possibly because your command has shell chars in it so first a shell is spawned and it runs your program. you may be killing the shell but not reaping its child. you can reap it with a SIGCHLD handler. or if you use the pipe idea above you will get its pid from the open and be able to kill the process directly if it times out. uri -- Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com -- ------------ Perl Developer Recruiting and Placement Services ------------- ----- Perl Code Review, Architecture, Development, Training, Support ------- _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

