Commit 19d3386
authored
timeout: use nix kill/setpgid to reduce unsafe (#10120)
* refactor(timeout): replace unsafe libc calls with nix crate equivalents
Replace unsafe `libc::kill` and `libc::setpgid` calls in the timeout utility
with safer nix crate wrappers (`kill`, `getpid`, `setpgid`) to reduce unsafe code
usage and improve overall code safety. This maintains functionality while
leveraging Rust's type safety for signal and process group operations.
* refactor(timeout): reorder imports for consistency
Reorder nix imports to alphabetical order in timeout.rs for better code organization and readability. No functional changes.1 parent 23b11ea commit 19d3386
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
296 | | - | |
297 | | - | |
| 299 | + | |
| 300 | + | |
298 | 301 | | |
299 | 302 | | |
300 | 303 | | |
| |||
315 | 318 | | |
316 | 319 | | |
317 | 320 | | |
318 | | - | |
| 321 | + | |
319 | 322 | | |
320 | 323 | | |
321 | 324 | | |
| |||
0 commit comments