<div dir="ltr">Other dd implementations always show the status on exit, whether success<br>or failure. Fix that by using xsigatexit() (and clarify the comment for<br>that function a little, since it didn't previously address the "at exit"<br>part of its behavior at all).<br><br>This also fixes SIGUSR1 behavior so that we show the status immediately<br>rather than on the next trip round the read/write loop.<br><br>Tested with `dd of=/dev/full`, sending SIGUSR1 twice from another shell<br>(to see the status immediately each time, without exiting), then hitting<br>^C (to see the status and then exiting), then restarting dd and hitting<br>enter (to see a write error followed by the status before exiting).<br><br>Bug: <a href="https://issuetracker.google.com/177017283">https://issuetracker.google.com/177017283</a><br>---<br> lib/lib.c         |  7 ++++---<br> toys/pending/dd.c | 18 +++++-------------<br> 2 files changed, 9 insertions(+), 16 deletions(-)<br></div>