mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01: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"
|
||||
description: Please do a `yazi --debug` and paste the output here.
|
||||
value: |
|
||||
<details>
|
||||
|
||||
<!-- Paste the output between the backticks below: -->
|
||||
```sh
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
cargo publish -p yazi-shared
|
||||
cargo publish -p yazi-config
|
||||
cargo publish -p yazi-proxy
|
||||
cargo publish -p yazi-adaptor
|
||||
cargo publish -p yazi-boot
|
||||
cargo publish -p yazi-scheduler
|
||||
|
|
|
|||
|
|
@ -55,17 +55,11 @@ impl Signals {
|
|||
let tx = self.tx.clone();
|
||||
Ok(tokio::spawn(async move {
|
||||
while let Some(signal) = signals.next().await {
|
||||
if HIDER.try_acquire().is_err() {
|
||||
continue;
|
||||
}
|
||||
|
||||
match signal {
|
||||
SIGHUP | SIGTERM | SIGQUIT | SIGINT => {
|
||||
if tx.send(Event::Quit(Default::default())).is_err() {
|
||||
break;
|
||||
}
|
||||
tx.send(Event::Quit(Default::default())).ok();
|
||||
}
|
||||
SIGCONT => AppProxy::resume(),
|
||||
SIGCONT if HIDER.try_acquire().is_ok() => AppProxy::resume(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue