dd: simplify signal handling by removing Alarm timer thread#10768
dd: simplify signal handling by removing Alarm timer thread#10768Ecordonnier merged 3 commits intouutils:mainfrom
Conversation
5d85a25 to
6c9a81c
Compare
|
GNU testsuite comparison: |
CodSpeed Performance ReportMerging this PR will improve performance by 7%Comparing Summary
Performance Changes
Footnotes
|
|
Darn, the performance numbers are unfortunate, I'll have to see where this is coming from |
|
Theres two changes here, one to remove the alarm thread and one to remove the pipe based signal handler, I can simplify this to just remove the pipe based signal handler. |
6c9a81c to
d5c9c23
Compare
|
GNU testsuite comparison: |
|
Sweet lower memory and no performance regressions. |
|
While reviewing I've noticed we're missing macOS SIGINFO handling, so I've created #10776 as follow-up. |
| self_cell = "1.0.4" | ||
| selinux = "=0.6.0" | ||
| string-interner = "0.19.0" | ||
| signal-hook = "0.4.1" |
There was a problem hiding this comment.
we can also remove it from deny.toml AFAIU, since there are no version conflicts any more
|
GNU testsuite comparison: |
We have been experiencing intermittent failures in the dd unit tests, that are caused by the utility exiting with the SIGPIPE signal at the end of running and not returning an exit code. This is caused by the fact that this utility used pipes internally to handle signals and because it assumes that all rust programs ignore SIGPIPE.
When investigating the implementation of the signal handling, it appeared to me that the implementation was over-complicating things by having two separate threads involving pipes and atomic locks for timers that it could be very simplified by using the approach of just using a signal handler.
Fixes #10442
Fixes #10455
Fixes #10766