You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
POSIX does not precisely specify when the shell should execute trap commands. Some shells (bash, dash, and mksh) do not seem to run them while waiting for command-line input. If their behavior is acceptable, yash-rs's implementation can be simpler than the current yash.
If yash-rs is going to run traps while reading input, we will need a clever trick to make it possible to read input and run commands simultaneously. Especially:
Running commands requires a mutable reference to the entire Env while the lexer and parser also need a (non-mutable) reference to the alias set.
The shell must suspend reading when it receives a signal. In other words, the shell must not read input while running traps.
If line-editing is active, the shell should also suspend it while running traps.
Source::Trap
b9aa8606985836413fcbfcef292bb0c68be63f98629261c953f657fbcaba635fR140-R142)
More trap-related tasks tracked in #260
The text was updated successfully, but these errors were encountered: