On 4/10/25 7:51 PM, A. James Lewis wrote:
I'm not quite sure about that, I would be trying to get back the file
descriptor to use for a period and then close it... so if it fails to
open, then I don't know if "redirection error" makes sense, but then
again, I'm not sure what would the correct error be.

Certainly I would just be checking for a successful exit code from
opening the connection....

These special filenames, as long as bash interprets them, are only valid
in redirections. Redirections either succeed, in which case the specified
file descriptor is valid, or they fail, in which case it is not. If they
fail, it results in what POSIX calls a redirection error. When a special
builtin (e.g., `exec') gets a redirection error, POSIX requires the shell
to exit, so an instance of bash running in POSIX mode, such as when it's
invoked as `sh', wouldn't even get to trying the next server.

So you would have to take that into account if I add connection timeouts
(and even now without them).

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to