changeset 3415:2c8fda3c38c1

6455727 lighttpd cannot be killed upon hanging in sendfilev()
author amehta
date Fri, 12 Jan 2007 09:09:52 -0800
parents ff9ba99c65c7
children c2574e3d30cf
files usr/src/uts/common/fs/sockfs/socksyscalls.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/fs/sockfs/socksyscalls.c	Fri Jan 12 07:31:26 2007 -0800
+++ b/usr/src/uts/common/fs/sockfs/socksyscalls.c	Fri Jan 12 09:09:52 2007 -0800
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -2316,8 +2316,11 @@
 		stp = vp->v_stream;
 		mutex_enter(&stp->sd_lock);
 		while (!(stp->sd_flag & STZCNOTIFY)) {
-			(void) cv_wait_sig(&stp->sd_zcopy_wait,
-			    &stp->sd_lock);
+			if (cv_wait_sig(&stp->sd_zcopy_wait,
+				&stp->sd_lock) == 0) {
+				error = EINTR;
+				break;
+			}
 		}
 		stp->sd_flag &= ~STZCNOTIFY;
 		mutex_exit(&stp->sd_lock);