mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-11 03:40:05 +00:00
fix(proc): silence clippy in signal.rs test module
Adds expect(disallowed_types) at the tests module for the intentional sync BufReader usage in the zombie-process-group helper, and drops the absolute-path call site by bringing pre_exec_setpgid into scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c5de844d66
commit
f33d8df98a
1 changed files with 6 additions and 1 deletions
|
|
@ -146,12 +146,17 @@ pub fn sigusr2(pid: u32) {
|
|||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[expect(
|
||||
clippy::disallowed_types,
|
||||
reason = "Tests use sync std::io::BufReader to read a short-lived helper's stdout synchronously."
|
||||
)]
|
||||
mod tests {
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::process::{Command, Stdio};
|
||||
use std::time::Duration;
|
||||
|
||||
use super::{process_exists, process_group_alive, process_running};
|
||||
use crate::pre_exec::pre_exec_setpgid;
|
||||
|
||||
#[test]
|
||||
fn process_running_returns_true_for_current_process() {
|
||||
|
|
@ -199,7 +204,7 @@ mod tests {
|
|||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null());
|
||||
crate::pre_exec::pre_exec_setpgid(&mut child);
|
||||
pre_exec_setpgid(&mut child);
|
||||
let mut child = child.spawn().expect("group leader should spawn");
|
||||
let pgid = child.id();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue