mirror of
https://github.com/block/goose.git
synced 2026-06-02 06:19:33 +02:00
bcc2955009
The resolve_login_shell_path() function spawns a shell with -l -i -c to
recover the user's PATH. The -i (interactive) flag causes zsh to call
tcsetpgrp(), stealing the foreground process group from the parent goose
process. When rustyline later calls tcsetattr to enter raw mode, goose
is in a background process group and receives SIGTTOU, suspending the
CLI immediately after the banner prints.
Since commit b7aea3dc9 ('warm shell PATH lookup during session init'),
this shell is spawned eagerly at startup rather than lazily on first
shell command, making the race condition much more likely to trigger.
The -l (login) flag alone is sufficient to source .zprofile/.bash_profile
where PATH modifications are typically configured.
Signed-off-by: Michael Neale <michael.neale@gmail.com>