Created attachment 144693 [details] Patch to add siginfo support to chmod and chgrp. This is a patch that adds support for the SIGINFO to chmod and chown. Its output is just like the output that would have been shown if -v were specified. New output: shadrach:/usr/src% chown -R dan:wsrc * load: 0.18 cmd: chown 32763 [zio->io_cv] 0.73r 0.00u 0.03s 0% 1816k cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c: 1001:999 -> 1001:980 load: 0.17 cmd: chown 32763 [zio->io_cv] 4.16r 0.02u 0.15s 1% 1880k contrib/libarchive/cpio/cpio.c: 1001:980 -> 1001:980 load: 0.15 cmd: chown 32763 [zio->io_cv] 7.07r 0.02u 0.28s 2% 1880k crypto/heimdal/appl/ftp/common/Makefile.in: 1001:980 -> 1001:980 shadrach:/usr/src% chmod -R g+rw * load: 0.16 cmd: chmod 32805 [running] 1.10r 0.06u 0.99s 10% 1772k sys/contrib/ngatm/netnatm/api/ccatm.h: 0100644 [-rw-r--r-- ] -> 0100664 [-rw-rw-r-- ]
I have only small nits to add. for both tools: - no signal.h included - manual pages not updated to reflect new functionality chown: - if (vflag) { verbose(p, vflag); } should loose braces - 'verbose' is not the best name, maybe 'print_info'? Patches for both utils should be attached separately. Care to plug these problems? Other than that looks good to me.
I shall fix both problems later today.
Created attachment 144710 [details] chmod patch with updated makefile
Created attachment 144711 [details] chown patch with updated manage
(In reply to Dan McGregor from comment #3) > Created attachment 144710 [details] > chmod patch with updated makefile And apparently I don't proofread; that's updated man page not makefile.
A commit references this bug: Author: cem Date: Sun Jan 8 06:50:53 UTC 2017 New revision: 311668 URL: https://svnweb.freebsd.org/changeset/base/311668 Log: chmod: Add SIGINFO handler PR: 191884 Submitted by: Dan McGregor <dan.mcgregor at usask.ca> Reviewed by: mjg@ (earlier version) Changes: head/bin/chmod/chmod.1 head/bin/chmod/chmod.c
A commit references this bug: Author: cem Date: Sun Jan 8 06:58:43 UTC 2017 New revision: 311669 URL: https://svnweb.freebsd.org/changeset/base/311669 Log: chown/chgrp: Add SIGINFO handler PR: 191884 Submitted by: Dan McGregor <dan.mcgregor at usask.ca> Reviewed by: mjg@ (earlier version) Changes: head/usr.sbin/chown/chgrp.1 head/usr.sbin/chown/chown.8 head/usr.sbin/chown/chown.c
Thanks, committed!
FYI I've just added the same support to chflags.