mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-22 15:51:18 -03:00
debug_thread_error to wait for a signal instead of sleep
Allows for control-C out of it
This commit is contained in:
@@ -2269,7 +2269,11 @@ void append_path_component(wcstring &path, const wcstring &component) {
|
||||
|
||||
extern "C" {
|
||||
[[gnu::noinline]] void debug_thread_error(void) {
|
||||
while (1) sleep(9999999);
|
||||
// Wait for a SIGINT. We can't use sigsuspend() because the signal may be delivered on another
|
||||
// thread.
|
||||
auto &tm = topic_monitor_t::principal();
|
||||
auto gens = tm.current_generations();
|
||||
tm.check(&gens, {topic_t::sighupint}, true /* wait */);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user