Skip to content

env: fix regression of --ignore-signal=PIPE#9618

Merged
ChrisDryden merged 1 commit intouutils:mainfrom
Ecordonnier:eco/env/execvp
Feb 9, 2026
Merged

env: fix regression of --ignore-signal=PIPE#9618
ChrisDryden merged 1 commit intouutils:mainfrom
Ecordonnier:eco/env/execvp

Conversation

@Ecordonnier
Copy link
Collaborator

@Ecordonnier Ecordonnier commented Dec 9, 2025

Fixes #9617

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (was skipped on 'main', now failing)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/inotify-dir-recreate is now passing!

@sylvestre
Copy link
Contributor

please fix the conflicts

@Ecordonnier
Copy link
Collaborator Author

Ecordonnier commented Jan 5, 2026

please fix the conflicts

I have fixed the conflicts. However while doing it I have noticed that the test fails if the default "yes" is from uutils coreutils on the machine running the test (it works with "yes" from GNU coreutils). This is because uutils yes unconditionally restores the sigpipe handler to its default value (by calling enable_pipe_errors().

I could fix it in this PR as well, but it is not directly related in principle.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

GNU testsuite comparison:

GNU test failed: tests/tail/tail-n0f. tests/tail/tail-n0f is passing on 'main'. Maybe you have to rebase?
Note: The gnu test tests/csplit/csplit-heap is now being skipped but was previously passing.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@Ecordonnier Ecordonnier force-pushed the eco/env/execvp branch 2 times, most recently from 6130ebb to 0cd6f10 Compare February 7, 2026 20:16
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 7, 2026

CodSpeed Performance Report

Merging this PR will degrade performance by 3.57%

Comparing Ecordonnier:eco/env/execvp (11708b5) with main (f828549)

Summary

❌ 1 regressed benchmark
✅ 283 untouched benchmarks
⏩ 38 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation cp_large_file[16] 377.8 µs 391.8 µs -3.57%

Footnotes

  1. 38 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Ecordonnier
Copy link
Collaborator Author

I have changed the test to use seq instead of yes. For some unknown reason, yes doesn't seem to exit when receiving EPIPE in the openbsd CI job. Thus the openbsd test job was hanging forever.

- revert uutils#9614 because `Command::exec()` resets the default signal handler for SIGPIPE, interfering with the option `--ignore-signal=PIPE`
- add regression-test for --ignore-signal=PIPE

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

GNU testsuite comparison:

GNU test failed: tests/pr/bounded-memory. tests/pr/bounded-memory is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/pr/bounded-memory is no longer failing!

@Ecordonnier
Copy link
Collaborator Author

@sylvestre @cakebaker the PR is good to go. The CodSpeed failure is in cp and is unrelated to this PR.

@ChrisDryden
Copy link
Collaborator

I was keeping an eye on this PR for when the 9.10 upgrade happened since the env-signal gnu test began failing because it added a test for SIGPIPE, when running the tests locally I was able to confirm that this fixes all of the tests related to env and sigpipes. The only reason the GNU test is still failing is because we're missing RTMIN and RTMAX in our signal library

@ChrisDryden
Copy link
Collaborator

Was fuzzing to see the other impacts of this change by using strace and by trying to explore what exec does under the hood and I haven't come across any other behaviors that this would regress and it fixes multiple test cases the env signal handler gnu test. We should also do a similar change in timeout eventually and it will allow us to remove a bunch of unsafe blocks.

@ChrisDryden ChrisDryden merged commit e4e95a7 into uutils:main Feb 9, 2026
196 of 198 checks passed
cerdelen pushed a commit to cerdelen/coreutils that referenced this pull request Feb 12, 2026
- revert uutils#9614 because `Command::exec()` resets the default signal handler for SIGPIPE, interfering with the option `--ignore-signal=PIPE`
- add regression-test for --ignore-signal=PIPE

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

env: ignoring SIGPIPE not working

3 participants