procmail
[Top] [All Lists]

Re: How can I catch a TIMEOUT as an error?

1998-01-23 07:13:02
Thu 98-01-22 Bill Costa - University of New Hampshire 
<Bill(_dot_)Costa(_at_)UNH(_dot_)EDU>
|      TIMEOUT=300                                # Kill dispatcher if it runs
|                                                 #   for more than 5 minutes.
|      :0 w
|      * ? $DISPATCHER  "$BOTNAME"  "$CMDFROM"  "$CMDLINE"
|      $DONEFLDR
| 
|      :0 c     # fall here if timeout
|      $FAILFLDR


Indeed, something weird is happening. My test failed too:
For this procmail Terminated the `sleep' but than hang forever,
never executing any other lines.

    TIMEOUT = 2
    status  = `sleep 60 && echo ok`

    :0
    *! status ?? ok
    {
        dummy = "Error, do something"
    }

And this terminates `sleep', but also sinks to /dev/null. Uhm.
And what's that gnost over there: Executing "" ?

    :0 w
    * ? `sleep 60`
    /dev/null

    :0 
    * ! LASTFOLDER ?? /dev/null
    {
        timeout_happened
    }

    procmail: Assigning "TIMEOUT=2"
    procmail: Executing "sleep,60"
    procmail: [28830] Fri Jan 23 15:51:44 1998
    procmail: Timeout, terminating "sleep"
    procmail: Executing ""
    procmail: Assigning "LASTFOLDER="
    procmail: Match on ""
    procmail: Assigning "LASTFOLDER=/dev/null"
    procmail: Opening "/dev/null"


jari

<Prev in Thread] Current Thread [Next in Thread>