Skip to content

Commit 99df609

Browse files
Copilotjgarzik
andcommitted
Remove signal termination handling per feedback
Remove code >= 128 signal handling from all 3 locations: - handle_exec_result! macro - insert mode handler - final args handler Keep INSERT_ARG_MAX constant and validation as requested. All 25 tests still passing. Co-authored-by: jgarzik <494411+jgarzik@users.noreply.github.com>
1 parent 79824f7 commit 99df609

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

process/xargs.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,6 @@ macro_rules! handle_exec_result {
568568
ExecResult::Exited(255) => {
569569
return Ok(SpawnResult { exit_code: 1 });
570570
}
571-
ExecResult::Exited(code) if code >= 128 => {
572-
// POSIX: utility terminated by signal - exit immediately
573-
eprintln!("xargs: command terminated by signal");
574-
return Ok(SpawnResult { exit_code: 1 });
575-
}
576571
ExecResult::Exited(code) if code != 0 => {
577572
$any_failed = true;
578573
}
@@ -703,11 +698,6 @@ fn read_and_spawn(args: &Args) -> io::Result<SpawnResult> {
703698
ExecResult::Exited(255) => {
704699
return Ok(SpawnResult { exit_code: 1 });
705700
}
706-
ExecResult::Exited(code) if code >= 128 => {
707-
// POSIX: utility terminated by signal - exit immediately
708-
eprintln!("xargs: command terminated by signal");
709-
return Ok(SpawnResult { exit_code: 1 });
710-
}
711701
ExecResult::Exited(code) if code != 0 => {
712702
any_failed = true;
713703
}
@@ -729,11 +719,6 @@ fn read_and_spawn(args: &Args) -> io::Result<SpawnResult> {
729719
ExecResult::Exited(255) => {
730720
return Ok(SpawnResult { exit_code: 1 });
731721
}
732-
ExecResult::Exited(code) if code >= 128 => {
733-
// POSIX: utility terminated by signal - exit immediately
734-
eprintln!("xargs: command terminated by signal");
735-
return Ok(SpawnResult { exit_code: 1 });
736-
}
737722
ExecResult::Exited(code) if code != 0 => {
738723
any_failed = true;
739724
}

0 commit comments

Comments
 (0)