[request-sponsor] Adding status support to dd
Matty wrote: Howdy, Most Linux and BSD distributions ship with a version of dd that displays the status of a copy operation when a SIGUSR1 signal is received. Just a correction. I know this is late in the game, and I don't want to prolong the discussion much, since this isn't the right list, but: *BSD uses SIGINFO, which is generated via the tty code when the user presses ^T. Several tools implement a status handler that uses SIGINFO. I think OpenSolaris doesn't have this functionality (it was a BSD-specific piece of functionality), hence another signal would have to be used, but that also makes it less useful (typing ^T to the tty where the command is running, vs. having to go to another window, doing a pgrep, and then a kill -USR1). - Frank
[request-sponsor] Re: Adding status support to dd
Richard L. Hamilton wrote: I suppose that *BSD ignores SIGINFO by default, so that programs that don't wish to support it aren't bothered? Yep. Seems like this _could_ be added, insofar as slots 16-19 of termios c_cc[] are still unused. Have to add another signal too (eating into the number of realtime signals, I suppose). And a few lines to os/sig.c, a #define for VSTATUS to sys/termios.h, io/ldterm.c (looks like VSTATUS should only be interpreted if IEXTEN is enabled?) and I'm not sure what else. And of course a bit of research to see if one could do it in a way reasonably source compatible with Linux and/or *BSD. Sure. It's pretty much the same as the handling for ^C and, for example. - Frank