exec and non-zero exit-codes
From: Andreas Leitgeb (avl_at_gamma.logic.tuwien.ac.at)
Date: 06/25/04
- Next message: Donal K. Fellows: "Re: Tk crashes with PNG images (request for reproducibility)"
- Previous message: Usman Muzaffar: "Re: exec question"
- Next in thread: Jos Decoster: "Re: exec and non-zero exit-codes"
- Reply: Jos Decoster: "Re: exec and non-zero exit-codes"
- Reply: Glenn Jackman: "Re: exec and non-zero exit-codes"
- Reply: lvirden_at_gmail.com: "Re: exec and non-zero exit-codes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Jun 2004 08:46:07 GMT
Every once in a while, I need to exec some program from my
Tcl-scripts, and deal with the fact that these programs may
return an exit-code !=0, or even ==0 but issue an harmless
warning to stderr, which will all cause exec to throw an
exception.
If, otoh, I just catch the exec, then I won't even notice
if the program itself was executed, or whether I just mistyped
some variable name in the arguments.
It is surely possible to make some procedure to wrap exec
which will catch, check ::errorCode and re-throw the exception
if anything else than non-zero exit-status or stderr-output
triggered the error and return the real exit-status (and
eventually store the output to a specified variable).
The question is: has such a procedure been written already
and is available, or would I have to do it myself?
PS: I've read about [try ...], and it would surely help to
implement the procedure I'm after, but its not yet the
whole answer.
- Next message: Donal K. Fellows: "Re: Tk crashes with PNG images (request for reproducibility)"
- Previous message: Usman Muzaffar: "Re: exec question"
- Next in thread: Jos Decoster: "Re: exec and non-zero exit-codes"
- Reply: Jos Decoster: "Re: exec and non-zero exit-codes"
- Reply: Glenn Jackman: "Re: exec and non-zero exit-codes"
- Reply: lvirden_at_gmail.com: "Re: exec and non-zero exit-codes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|