svn commit: r253901 - stable/9/cddl/contrib/opensolaris/lib/libzfs/common

Steven Hartland smh at FreeBSD.org
Fri Aug 2 23:31:28 UTC 2013


Author: smh
Date: Fri Aug  2 23:31:28 2013
New Revision: 253901
URL: http://svnweb.freebsd.org/changeset/base/253901

Log:
  MFC r253818:
  
  Fix zfs send -D hang after processing requiring a CTRL+C to interrupt due to
  pthread_join prior to fd close.
  
  Approved by:	re (delphij)

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/lib/libzfs/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c	Fri Aug  2 23:30:32 2013	(r253900)
+++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c	Fri Aug  2 23:31:28 2013	(r253901)
@@ -1576,8 +1576,8 @@ zfs_send(zfs_handle_t *zhp, const char *
 	if (tid != 0) {
 		if (err != 0)
 			(void) pthread_cancel(tid);
-		(void) pthread_join(tid, NULL);
 		(void) close(pipefd[0]);
+		(void) pthread_join(tid, NULL);
 	}
 
 	if (sdd.cleanup_fd != -1) {
@@ -1613,8 +1613,8 @@ err_out:
 		VERIFY(0 == close(sdd.cleanup_fd));
 	if (tid != 0) {
 		(void) pthread_cancel(tid);
-		(void) pthread_join(tid, NULL);
 		(void) close(pipefd[0]);
+		(void) pthread_join(tid, NULL);
 	}
 	return (err);
 }


More information about the svn-src-stable-9 mailing list