Re: Perl executing a command (on UNIX)



On Aug 14, 7:20 am, xhos...@xxxxxxxxx wrote:
gil <gil.kov...@xxxxxxxxx> wrote:
Hi,

I'm new at perl programming,
I'd like to execute a UNIX command, which takes no longer than
$time_out seconds.

What do you want to happen when the $time_out seconds has expired?

Is there any easy way to do it, or do I have to use SIGs?

IPC::Run might be useful. It also might be overkill for a simple timeout,
though. But probably easier than handling it all yourself with fork
and alarm and kill and whatnot.

Xho

--
--------------------http://NewsReader.Com/--------------------
Usenet Newsgroup Service $9.95/Month 30GB

Thanks! exactly what I was looking for (just want the execution to
terminate).

Gil

.



Relevant Pages

  • Re: C executable not working from a Tcl shell
    ... It has to return int value, instead of void. ... If mainnever returns but instead calls exit(), ... I havent called 'exec' to execute my 'C' executable. ... C executable from a 'tclsh' shell invoked from UNIX command line. ...
    (comp.lang.tcl)
  • Re: VBA Telnet ?????
    ... FTP this file to a UNIX server. ... Execute a UNIX command to process the file. ... Does anyone have any sample code to do this? ...
    (comp.databases.ms-access)
  • Re: Unkowingly Took PHP Job with undgodly PHP Gurus ...
    ... get encourament. ... I am not kidding when I say these guys execute ... unix command at the speed of light it's nearly impossible to ...
    (comp.lang.php)
  • Re: Perl executing a command (on UNIX)
    ... gil wrote: ... I'm new at perl programming, ... I'd like to execute a UNIX command, ...
    (comp.lang.perl.misc)
  • du command failing
    ... directory if the directory does not have a Read or Execute permission. ... Now from UNIX command line i swithced onto a tclshell using 'tclsh' ...
    (comp.lang.tcl)