Re: Time Out an Exec Call



On Tue, 30 May 2006 11:32:21 -0500, "robert"
<ab@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

look in php.net online docs and faq's...this is covered where you can
specify a max wait time when looking for a response.


"Tyrone Slothrop" <ts@xxxxxxxxxxxxx> wrote in message
news:e7qo72pehnnnf7sh6uoq7vfjkpj047ou6p@xxxxxxxxxx
|I am using exec() to run a number of StarOS tests on multiple IP's
| (they test various aspects of router and server functions). The
| problem I have is that an invalid IP may cause a delay of a few
| minutes in the execution of the script. I cannot use ping to test the
| validity of an IP since ping may be blocked.
|
| Is there a way to stop the execution of a loop if, after a few
| seconds, there is no response from the server? I would guess that the
| exec() would have to be called from inside of some sort of timer,
| though the solution escapes me.
|
| TIA!

Top posting aside (as well as Martin's obsessive "sic-ness"), consider
that there are two loops involved in the script and a number of
tangental functions as well. I need to evaluate a timeout within the
inner loop. Timing out the entire script does not help.

I was considering running pcntl functions, but is not installed on
this server.

.



Relevant Pages

  • Re: exec command help
    ... :> in a shell script as I have done before to keep them in the current ... :> continue after the loop sets the variables. ... :> while read grp ... exec 0<&3 # restore stdin ...
    (comp.unix.shell)
  • Re: read, printf, and special chars
    ... I've written a simple script to look for a certain pattern in a .cpp ... Here is the main loop: ... exec 4> $FileOut ... usage of read without -r and without modifying IFS ...
    (comp.unix.shell)
  • Re: exec command help
    ... > in a shell script as I have done before to keep them in the current ... > continue after the loop sets the variables. ... exec 3<&0 0< WHEREFROM ...
    (comp.unix.solaris)
  • exec command help
    ... I am trying to use the "exec" command to set some variables from a file ... in a shell script as I have done before to keep them in the current ... Problem is this is not an interactive script like the other one so ... continue after the loop sets the variables. ...
    (comp.unix.shell)
  • exec command help
    ... I am trying to use the "exec" command to set some variables from a file ... in a shell script as I have done before to keep them in the current ... Problem is this is not an interactive script like the other one so ... continue after the loop sets the variables. ...
    (comp.unix.solaris)