[request-sponsor] Adding status support to dd

2007-04-06 Thread Frank Van Der Linden
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

[request-sponsor] Adding status support to dd

2007-04-06 Thread david.co...@sun.com
> 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 th

[request-sponsor] Adding status support to dd

2007-04-06 Thread Bart Smaalders
James Carlson wrote: > James Carlson writes: >> Frank Van Der Linden writes: >>> 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 thi

[request-sponsor] Adding status support to dd

2007-04-06 Thread James Carlson
James Carlson writes: > Frank Van Der Linden writes: > > 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 ga

[request-sponsor] Adding status support to dd

2007-04-06 Thread James Carlson
Frank Van Der Linden writes: > 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

[request-sponsor] Adding status support to dd

2007-04-05 Thread casper....@sun.com
>Note that SA_RESTART must be set; otherwise dd from a pipe or other slow >device will return an error condition. I also like Casper's suggestion >to use sprintf and write to stderr, since sprintf is now >async-signal-safe. Note also that there are three gettext()s of constant strings; these sh

[request-sponsor] Adding status support to dd

2007-04-05 Thread Bart Smaalders
Bonnie Corwin wrote: > Hi Bart, > > I assume your comment about helping to get this into shape means you > will sponsor Ryan's work. Can someone file a bug, if there isn't one > already, so I can add this to the table? > > Thanks. > > Bonnie 6543165 dd should display incremental progress al

[request-sponsor] Adding status support to dd

2007-04-05 Thread Bonnie Corwin
Hi Bart, I assume your comment about helping to get this into shape means you will sponsor Ryan's work. Can someone file a bug, if there isn't one already, so I can add this to the table? Thanks. Bonnie Bart Smaalders wrote: > Matty wrote: > >> On 4/5/07, James Carlson wrote: >> >>> Darren

[request-sponsor] Adding status support to dd

2007-04-05 Thread Darren J Moffat
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. For some reason /usr/bin/dd on Solaris hosts doesn't contain > this capability, and I would like to add it. After reading through

[request-sponsor] Adding status support to dd

2007-04-05 Thread Matty
On 4/5/07, Matty wrote: > On 4/5/07, James Carlson wrote: > > Darren J Moffat writes: > > > 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. For so

[request-sponsor] Adding status support to dd

2007-04-05 Thread casper....@sun.com
>This is prob. overkill in this situation... since the main loop >will only do stdio just before exiting, it could set >signal handlers to SIG_IGN before doing any IO which should >prevent any problems from arising. Why not use snprintf and write? Casper

[request-sponsor] Adding status support to dd

2007-04-05 Thread Matty
On 4/5/07, James Carlson wrote: > Darren J Moffat writes: > > 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. For some reason /usr/bin/dd on Solaris hosts do

[request-sponsor] Adding status support to dd

2007-04-05 Thread James Carlson
Darren J Moffat writes: > 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. For some reason /usr/bin/dd on Solaris hosts doesn't contain > > this capability, and I would

[request-sponsor] Adding status support to dd

2007-04-05 Thread Bart Smaalders
Matty wrote: > On 4/5/07, James Carlson wrote: >> Darren J Moffat writes: >> > 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. For some reason /usr/bin/

[request-sponsor] Adding status support to dd

2007-04-05 Thread William Kucharski
Matty wrote: > Do folks see any issue with using similar code to add a SIGUSR1 signal > handler?: > > if (signal(SIGUSR1, SIG_IGN) != SIG_IGN) > { >(void) signal(SIGUSR1, stats); > } > > This would minmize the amount of code that would need to be added to > get stats functionality, and

[request-sponsor] Adding status support to dd

2007-04-04 Thread Matty
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. For some reason /usr/bin/dd on Solaris hosts doesn't contain this capability (it has a signal handler for SIGINT which causes stats to be displayed, but

[request-sponsor] Adding status support to dd

2007-04-04 Thread Matty
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. For some reason /usr/bin/dd on Solaris hosts doesn't contain this capability, and I would like to add it. After reading through the source code for dd.c

[request-sponsor] Adding status support to dd

2007-04-04 Thread Bart Smaalders
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. For some reason /usr/bin/dd on Solaris hosts doesn't contain > this capability (it has a signal handler for SIGINT which causes s