lundman commented on this pull request.


>               (void) fprintf(stderr, "TIME        SENT   SNAPSHOT\n");
 
        /*
         * Print the progress from ZFS_IOC_SEND_PROGRESS every second.
         */
        for (;;) {
-               (void) sleep(1);
+
+               /*
+                * If we are doing 'send -v' sleep for 1 second, otherwise
+                * sleep forever, until signal or quitting.
+                */
+               if (!pa->pa_progress) {
+                       while (send_progress_thread_signal == 0)
+                               (void) sleep(1);

sleep(1) is what it did before, so I merely kept the style. I am unsure if 
'semaphore use' in signal-context is allowed, the list of allowed calls at that 
context, is tedious (with porting in mind). 

-- 
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#discussion_r221793308
------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T000e5d283b7db7e5-M3e982872f8d694712c2eb4ae
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to