mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Fix a deadlock affecting fish_config
This fixes the following deadlock. The C++ functions path_get_config and path_get_data lazily determine paths and then cache those in a C++ static variable. The path determination requires inspecting the environment stack. If these functions are first called while the environment stack is locked (in this case, when fetching the $history variable) we can get a deadlock. The fix is to call them eagerly during env_init. This can be removed once the corresponding C++ functions are removed. This issue caused fish_config to fail to report colors and themes. Add a test.
This commit is contained in:
@@ -105,3 +105,6 @@ $fish --no-config -c 'echo notprinted | and true'
|
||||
# CHECKERR: echo notprinted | and true
|
||||
# CHECKERR: ^~^
|
||||
|
||||
# Regression test for a hang.
|
||||
echo "set -L" | $fish > /dev/null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user