Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern truncated output from pty problem. fix by enami



details:   https://anonhg.NetBSD.org/src/rev/d3c30880e492
branches:  trunk
changeset: 551579:d3c30880e492
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Sep 08 11:14:18 2003 +0000

description:
truncated output from pty problem.  fix by enami
http://mail-index.netbsd.org/tech-kern/2003/09/06/0002.html

diffstat:

 sys/kern/kern_synch.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r a77b2c494328 -r d3c30880e492 sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c     Mon Sep 08 10:54:14 2003 +0000
+++ b/sys/kern/kern_synch.c     Mon Sep 08 11:14:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_synch.c,v 1.136 2003/08/07 16:31:50 agc Exp $     */
+/*     $NetBSD: kern_synch.c,v 1.137 2003/09/08 11:14:18 itojun Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.136 2003/08/07 16:31:50 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.137 2003/09/08 11:14:18 itojun Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ktrace.h"
@@ -467,7 +467,8 @@
         */
        if (catch) {
                l->l_flag |= L_SINTR;
-               if (((sig = CURSIG(l)) != 0) || (p->p_flag & P_WEXIT)) {
+               if (((sig = CURSIG(l)) != 0) ||
+                   ((p->p_flag & P_WEXIT) && p->p_nlwps > 1)) {
                        if (l->l_wchan != NULL)
                                unsleep(l);
                        l->l_stat = LSONPROC;
@@ -555,7 +556,7 @@
         * wait4() and _lwp_wait() from wedging an exiting process
         * would be preferred.
         */
-       if (catch && ((p->p_flag & P_WEXIT) && exiterr))
+       if (catch && ((p->p_flag & P_WEXIT) && p->p_nlwps > 1 && exiterr))
                return (EINTR);
        return (0);
 }



Home | Main Index | Thread Index | Old Index