From 784383c914b9487c501dc00e3dff1282cd34dc53 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Wed, 29 Mar 2023 21:40:21 +0300 Subject: [PATCH] Moved to network fd 4 to avoid random crashes on macs --- bopher-ng.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bopher-ng.sh b/bopher-ng.sh index 7c1c67e..b74b8bf 100755 --- a/bopher-ng.sh +++ b/bopher-ng.sh @@ -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