Moved to network fd 4 to avoid random crashes on macs

This commit is contained in:
Luxferre
2023-03-29 21:40:21 +03:00
parent 1d0047ee25
commit 784383c914
+1 -1
View File
@@ -66,7 +66,7 @@ trap clear_term INT
# fetch any Gopher resource
gophetch() { # args: host, port, selector[, input]
exec 4<>/dev/tcp/$1/$2 # bind the descriptor 3 to a /dev/tcp pseudo-device
exec 4<>/dev/tcp/$1/$2 # bind the descriptor 4 to a /dev/tcp pseudo-device
if [[ -z "$4" ]]; then
printf '%s\r\n' "$3" >&4 # send the selector string (printf is more reliable)
else