ahrens approved this pull request.
> + pa.pa_zhp = zhp;
+ pa.pa_fd = outfd;
+ pa.pa_parsable = flags->parsable;
+ pa.pa_progress = flags->progress;
+ pa.pa_siginfo = flags->siginfo;
+
+ if (pa.pa_siginfo) {
+ /* Make sure this thread ignores signal, or ioctl
aborts */
+ sigset_t sigset;
+ (void) sigemptyset(&sigset);
+ (void) sigaddset(&sigset, SIGINFO);
+ (void) pthread_sigmask(SIG_BLOCK, &sigset, NULL);
+ }
+
+ error = pthread_create(&tid, NULL,
+ send_progress_thread, &pa);
What if neither `progress` or `siginfo` is set? Does the thread (correctly) do
nothing then?
- if ((err = pthread_create(&tid, NULL,
+ if (pa.pa_siginfo) {
+ /* Make sure this thread ignores signal, or ioctl
aborts */
+ sigset_t sigset;
+ (void) sigemptyset(&sigset);
+ (void) sigaddset(&sigset, SIGINFO);
+ (void) pthread_sigmask(SIG_BLOCK, &sigset, NULL);
+ }
+
+ if ((err = pthread_create(&tid, NULL,
send_progress_thread, &pa)) != 0) {
What if neither `progress` or `siginfo` is set? Does the thread (correctly) do
nothing then?
Also, looks like the indentation is wrong, continuation should be +4 spaces.
(or maybe github is just rendering wrong)
--
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#pullrequestreview-155642816
------------------------------------------
openzfs: openzfs-developer
Permalink:
https://openzfs.topicbox.com/groups/developer/T000e5d283b7db7e5-M6ba91e81713027acd0fe8bed
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription