nushell/src
Ian Manske 924986576d
Do not block signals for child processes (#11402)
# Description / User-Facing Changes
Signals are no longer blocked for child processes launched from both
interactive and non-interactive mode. The only exception is that
`SIGTSTP`, `SIGTTIN`, and `SIGTTOU` remain blocked for child processes
launched only from **interactive** mode. This is to help prevent nushell
from getting into an unrecoverable state, since we don't support
background jobs. Anyways, this fully fixes #9026.

# Other Notes
- Needs Rust version `>= 1.66` for a fix in
`std::process::Command::spawn`, but it looks our current Rust version is
way above this.
- Uses `sigaction` instead of `signal`, since the behavior of `signal`
can apparently differ across systems. Also, the `sigaction` man page
says:
> The sigaction() function supersedes the signal() function, and should
be used in preference.

Additionally, using both `sigaction` and `signal` is not recommended.
Since we were already using `sigaction` in some places (and possibly
some of our dependencies as well), this PR replaces all usages of
`signal`.

# Tests
Might want to wait for #11178 for testing.
2024-01-15 16:08:21 -06:00
..
tests Allow plugins to receive configuration from the nushell configuration (#10955) 2024-01-15 16:59:47 +08:00
command.rs Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
config_files.rs Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00
ide.rs Make only_buffer_difference: true work (#11488) 2024-01-11 11:58:14 -06:00
logger.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
main.rs Do not block signals for child processes (#11402) 2024-01-15 16:08:21 -06:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
run.rs allow --login to be used with nu's --commands parameter (#10253) 2023-09-06 13:27:16 -05:00
signals.rs Simplify SIGQUIT handling (#11381) 2023-12-21 17:00:38 +01:00
terminal.rs Do not block signals for child processes (#11402) 2024-01-15 16:08:21 -06:00
test_bins.rs Apply nightly clippy fixes (#11508) 2024-01-15 10:52:16 +08:00
tests.rs Spread operator for list literals (#11006) 2023-11-22 23:10:08 +02:00

Nushell REPL

This directory contains the main Nushell REPL (read eval print loop) as part of the CLI portion of Nushell, which creates the nu binary itself.

Current versions of the nu binary will use the Nu argument parsing logic to parse the commandline arguments passed to nu, leaving the logic here to be a thin layer around what the core libraries.