Fix OAuth server blocking: redirect subshell stdout (#30)

start_oauth_server was called inside $() to capture the PID, but the
backgrounded nc subshell inherited the $() stdout pipe. Since $()
waits for ALL writers to close, it blocked forever until nc exited
(which never happens — it's listening).

Fix: redirect the subshell's stdout/stderr to /dev/null so it doesn't
hold the pipe open. The PID echo still works because it runs in the
parent (after the & backgrounds the child).

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
L 2026-02-07 17:00:50 -08:00 committed by GitHub
parent f2d8389083
commit d053865c29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -253,7 +253,7 @@ start_oauth_server() {
;;
esac
done
) </dev/null &
) </dev/null >/dev/null 2>&1 &
echo $!
}