Conversation
In some instances failure to open has caused the printf output to appear in other processes.
burl
Outdated
|
|
||
| exec 3<>/dev/tcp/${host}/${HTTP_PORT} | ||
| if exec 3<>/dev/tcp/${host}/${HTTP_PORT}; then | ||
|
|
There was a problem hiding this comment.
Please don't leave empty line after if statement.
burl
Outdated
| [[ $path == $host ]] && path="" | ||
|
|
||
| exec 3<>/dev/tcp/${host}/${HTTP_PORT} | ||
| if exec 3<>/dev/tcp/${host}/${HTTP_PORT}; then |
There was a problem hiding this comment.
Please enclose condition statement within [[ ]] brackets:
if [[ exec 3<>/dev/tcp/${host}/${HTTP_PORT} ]]; then
|
Changes applied. |
I am unable to use [[ … ]] as you request.
|
I'm sorry but your change doesn't fix anything, I get the same error with and without it when I execute the script with a non-existent domain name: |
|
I didn't explain things too well. The change fixes the impact of the printf outputting to the unopened file descriptor number 3. It does this by only executing the printf etc lines if the exec 3 file descriptor open is successful. It obviously isn't possible to fix connections to unreachable sites in the script. |
|
On my system which uses a pipe for inter-process communication writing to the unopened file descriptor 3 actually presents the contents of the printf to my process through its pipe. This impacted process is a separate executable, I suspect an issue somewhere in Linux triggered by the open failure in the burl script. I beleive I have worked around this internal issue by only using the file descriptor once it has opened correctly. |
In some instances failure to open has caused the printf output to
appear in other processes.