Skip to content

vunit: ignore SIGPIPE and tolerate EPIPE when piping input to child#146

Merged
Grillo-0 merged 1 commit into
developfrom
vunit-ignore-sigpipe-child
Jun 13, 2026
Merged

vunit: ignore SIGPIPE and tolerate EPIPE when piping input to child#146
Grillo-0 merged 1 commit into
developfrom
vunit-ignore-sigpipe-child

Conversation

@Grillo-0

Copy link
Copy Markdown
Member

vunit_run_vinumc writes the test input to the child's stdin without guarding against the child closing the read end early. When the child exits before reading (e.g. vinumc -h, which doesn't touch stdin), the write hits a closed pipe and SIGPIPE kills the parent test process -- observed as ERROR killed by signal 13 SIGPIPE on Linux/gcc, where vinumc exits faster than the write completes. Ignore SIGPIPE on entry and treat EPIPE as a non-fatal "child didn't read stdin"; downstream output/exit-status assertions remain the source of truth.

@Grillo-0 Grillo-0 self-assigned this Jun 12, 2026
vunit_run_vinumc writes the test input to the child's stdin without
guarding against the child closing the read end early. When the child
exits before reading (e.g. `vinumc -h`, which doesn't touch stdin),
the write hits a closed pipe and SIGPIPE kills the parent test
process -- observed as `ERROR killed by signal 13 SIGPIPE` on
Linux/gcc, where vinumc exits faster than the write completes.
Ignore SIGPIPE on entry and treat EPIPE as a non-fatal "child didn't
read stdin"; downstream output/exit-status assertions remain the
source of truth.
@Grillo-0 Grillo-0 force-pushed the vunit-ignore-sigpipe-child branch from 37dfff9 to 76eb1b3 Compare June 13, 2026 18:46
@Grillo-0 Grillo-0 merged commit 58f63ed into develop Jun 13, 2026
3 checks passed
@Grillo-0 Grillo-0 deleted the vunit-ignore-sigpipe-child branch June 13, 2026 18:49
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.

3 participants