tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Why no SIGINFO?



Bernd Ernesti <netbsd%lists.veego.de@localhost> writes:

> On Thu, Dec 29, 2011 at 01:13:18PM -0600, Daniel Loffgren wrote:
>> Is there any particularly compelling reason why NetBSD's mv, cp, et
>> al. don't respond to siginfo? I am more than willing to write it.
>
> Is there any documentation what that should do, is there a
> standard which defines what it should do, what the output
> should look and what are other OS do, like FreeBSD, linux, ...

I'm unaware of any standards.
dd, pax and find seem like good examples to follow in spirit for cp/mv.

ping outputs the final summary on status, and that makes sense for
programs that have a final summary.

dump outputs progress, similar to what it does periodically.

"find . -type f | xargs egrep SIGINFO" is a good place to start in our tree.



For cp/mv without r, I would show

  cp: n/m bytes (k bytes/sec)

with recursive

  cp: n/m files (k bytes/sec) path /foo/bar

and if the total bytes are available *without extra work*, then also

  cp: n/m files o/p bytes (k bytes/sec) path /foo/bar


I am ambivalent about the 'cp: ' prefix; find has it and dd does not.
Since the kernel prints the command, it's not clear that it's needed,
but it seems status output intermingled with command output can be
confusing, so it's probably better to err on the side of having it.




Perhaps a good step would be to spiff up wikipedia with examples:
  http://en.wikipedia.org/wiki/SIGINFO

Attachment: pgpKEDzdUwJ3Q.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index