Moved to network fd 4 to avoid random crashes on macs
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ trap clear_term INT
|
|||||||
|
|
||||||
# fetch any Gopher resource
|
# fetch any Gopher resource
|
||||||
gophetch() { # args: host, port, selector[, input]
|
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
|
if [[ -z "$4" ]]; then
|
||||||
printf '%s\r\n' "$3" >&4 # send the selector string (printf is more reliable)
|
printf '%s\r\n' "$3" >&4 # send the selector string (printf is more reliable)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user