xz: Add SIGTSTP handler for progress indicator time keeping.
commitff592c616eda274215b485cf1b8d34f060c9f3be
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 26 Jan 2023 16:29:17 +0000 (26 18:29 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 27 Jan 2023 17:37:47 +0000 (27 19:37 +0200)
tree7c3141dc351c68803372e7bcae4a87e5d7dcb6a7
parent3b1c8ac8d1d553cbb1fb22b545d2b1424c752b76
xz: Add SIGTSTP handler for progress indicator time keeping.

This way, if xz is stopped the elapsed time and estimated time
remaining won't get confused by the amount of time spent in
the stopped state.

This raises SIGSTOP. It's not clear to me if this is the correct way.
POSIX and glibc docs say that SIGTSTP shouldn't stop the process if
it is orphaned but this commit doesn't attempt to handle that.

Search for SIGTSTP in section 2.4.3:

https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
src/xz/mytime.c
src/xz/mytime.h
src/xz/private.h
src/xz/signals.c