Change the send_progress_thread() to always be started, both for one-second
progress, and to idle for SIGINFO signal when not. Uses pthread_sigmask() to
control which thread receives the signal, or the "main" thread sitting
in ioctl(IOC_SEND) will abort. Signal handling is only enabled if
flag_siginfo is set (always done in zfs cmd) so that other users of
libzfs can avoid it.

Currently both shell and zfs send status is printed.

 load: 0.51  cmd: zfs 1523 waiting 0.04u 0.35s
 16:29:07   26.5M   BOOM@send
 load: 0.82  cmd: zfs 1523 waiting 0.04u 1.17s
 16:29:18    206M   BOOM@send
 load: 1.15  cmd: zfs 1523 waiting 0.04u 2.05s
 16:29:30    948M   BOOM@send

Signed-off-by: Jorgen Lundman <lund...@lundman.net>
You can view, comment on, or merge this pull request online at:

  https://github.com/openzfs/openzfs/pull/638

-- Commit Summary --

  * Add SIGINFO feature to zfs send

-- File Changes --

    M usr/src/cmd/zfs/zfs_main.c (5)
    M usr/src/lib/libzfs/common/libzfs.h (3)
    M usr/src/lib/libzfs/common/libzfs_sendrecv.c (117)
    M usr/src/lib/libzfs_core/common/libzfs_core.c (2)
    M usr/src/lib/libzfs_core/common/libzfs_core.h (3)

-- Patch Links --

https://github.com/openzfs/openzfs/pull/638.patch
https://github.com/openzfs/openzfs/pull/638.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/638

------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/discussions/T000e5d283b7db7e5-M91fd84c93014bcf7f392a67e
Delivery options: https://openzfs.topicbox.com/groups

Reply via email to