mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: respond to the SIGTERM signal even when Yazi is in the background and has passed control of the terminal to the spawned process (#797)
This commit is contained in:
parent
457c2a5c06
commit
094d44e3ec
3 changed files with 7 additions and 8 deletions
4
.github/ISSUE_TEMPLATE/bug.yml
vendored
4
.github/ISSUE_TEMPLATE/bug.yml
vendored
|
|
@ -37,10 +37,14 @@ body:
|
||||||
label: "`yazi --debug` output"
|
label: "`yazi --debug` output"
|
||||||
description: Please do a `yazi --debug` and paste the output here.
|
description: Please do a `yazi --debug` and paste the output here.
|
||||||
value: |
|
value: |
|
||||||
|
<details>
|
||||||
|
|
||||||
<!-- Paste the output between the backticks below: -->
|
<!-- Paste the output between the backticks below: -->
|
||||||
```sh
|
```sh
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
cargo publish -p yazi-shared
|
cargo publish -p yazi-shared
|
||||||
cargo publish -p yazi-config
|
cargo publish -p yazi-config
|
||||||
|
cargo publish -p yazi-proxy
|
||||||
cargo publish -p yazi-adaptor
|
cargo publish -p yazi-adaptor
|
||||||
cargo publish -p yazi-boot
|
cargo publish -p yazi-boot
|
||||||
cargo publish -p yazi-scheduler
|
cargo publish -p yazi-scheduler
|
||||||
|
|
|
||||||
|
|
@ -55,17 +55,11 @@ impl Signals {
|
||||||
let tx = self.tx.clone();
|
let tx = self.tx.clone();
|
||||||
Ok(tokio::spawn(async move {
|
Ok(tokio::spawn(async move {
|
||||||
while let Some(signal) = signals.next().await {
|
while let Some(signal) = signals.next().await {
|
||||||
if HIDER.try_acquire().is_err() {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
match signal {
|
match signal {
|
||||||
SIGHUP | SIGTERM | SIGQUIT | SIGINT => {
|
SIGHUP | SIGTERM | SIGQUIT | SIGINT => {
|
||||||
if tx.send(Event::Quit(Default::default())).is_err() {
|
tx.send(Event::Quit(Default::default())).ok();
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
SIGCONT => AppProxy::resume(),
|
SIGCONT if HIDER.try_acquire().is_ok() => AppProxy::resume(),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue