[request-sponsor] Re: Adding status support to dd
Richard L. Hamilton wrote: > I'm very tempted to try to do the addition of SIGINFO, but it'd be sort of in > the blind, because I don't have the space to try to actually build it, nor > a system I'd be eager to reload to test it. > Hi Richard, The changes you propose look right. I'll take ownership of the CR that James filed (6310532), and will set things in motion to get SIGINFO supported. - Frank
[request-sponsor] Re: Adding status support to dd
William Kucharski wrote: > > This works in actual implementation but beware of the side effect that > now > any binary compiled prior to your change that does anything with > _SIGRTMIN > will now be doing it with SIGINFO. That could lead to some interesting > compatibility issues down the road. Applications should not use _SIGRT*, otherwise they get what they ask for :-) It looks like SIGRT* (no leading _) have been defined as sysconf(2) calls since 1993, I assume with the intent of making it possible to add signals in a backward compatible way. This has happened once already, in 1999, when SIGJVM1 and SIGJVM2 were added, and _SIGRTMIN was bumped according to the instruction in the comment in sys/iso/signal_iso.h. Like the signal.h(3HEAD) manpage says: SIGRTMIN * ExitFirst real time signal (SIGRTMIN+1) * ExitSecond real time signal ... (SIGRTMAX-1) * ExitSecond-to-last real time signal SIGRTMAX * ExitLast real time signal The symbols SIGRTMIN through SIGRTMAX are evaluated dynami- cally to permit future configurability. - 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
[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