3909 "zfs send -D" does not work
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>

References:
  https://www.illumos.org/issues/3909
  illumos/illumos-gate@36f7455d36

Ported-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1775
This commit is contained in:
Steven Hartland 2013-07-29 11:36:31 -08:00 committed by Brian Behlendorf
parent ea97f8ce35
commit 6389d42205

View File

@ -1572,8 +1572,8 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
if (tid != 0) { if (tid != 0) {
if (err != 0) if (err != 0)
(void) pthread_cancel(tid); (void) pthread_cancel(tid);
(void) pthread_join(tid, NULL);
(void) close(pipefd[0]); (void) close(pipefd[0]);
(void) pthread_join(tid, NULL);
} }
if (sdd.cleanup_fd != -1) { if (sdd.cleanup_fd != -1) {
@ -1609,8 +1609,8 @@ err_out:
VERIFY(0 == close(sdd.cleanup_fd)); VERIFY(0 == close(sdd.cleanup_fd));
if (tid != 0) { if (tid != 0) {
(void) pthread_cancel(tid); (void) pthread_cancel(tid);
(void) pthread_join(tid, NULL);
(void) close(pipefd[0]); (void) close(pipefd[0]);
(void) pthread_join(tid, NULL);
} }
return (err); return (err);
} }