[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ExecResult behavior is surprising
From: |
Chip Seraphine |
Subject: |
ExecResult behavior is surprising |
Date: |
Tue, 14 Jun 2005 08:11:10 -0500 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041206) |
ExecResult puts not only the stdout of the exec'd command into the
variable, but the stderr as well. This makes it almost impossible to
trap for errors, because I do not know what could be in there. (I now
have a ufsdump file named "device not found.dump" as a result of this.
<grin>)
I think it would be much more reasonable to only trap stdout; that way I
could look for null variables.
Another option would be to create a command with syntax like:
CheckExecResult("command",err_class)
If "command" returns nonzero, then err_class would be set.
--
Chip Seraphine
Unix Administrator
TradeLink, LLC
312-264-2048
chip@trdlnk.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ExecResult behavior is surprising,
Chip Seraphine <=