From xemacs-m  Sun May 11 22:50:50 1997
Received: from newman.aventail.com (root@newman.aventail.com [199.238.236.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id WAA26269
	for <xemacs-beta@xemacs.org>; Sun, 11 May 1997 22:50:49 -0500 (CDT)
Received: from kramer.in.aventail.com.aventail.com (wmperry@[192.168.1.12])
	by newman.aventail.com (8.8.5/8.8.5) with SMTP id UAA11312;
	Sun, 11 May 1997 20:50:50 -0700 (PDT)
To: =?ISO-2022-JP?B?GyRCO1RAbkMjOkgbKEI=?= / Tatsuya Ichikawa <ichikawa@hv.epson.co.jp>
Cc: xemacs-beta@xemacs.org
Subject: Re: w3/XEmacs never retruns on my system.
References: <wnk9lnl671.fsf@hv08.hv.epson.co.jp> <m2g1vwbg3z.fsf@altair.xemacs.org> <wnbu6hlbvu.fsf@hv08.hv.epson.co.jp>
Errors-to: wmperry@aventail.com
Reply-to: wmperry@aventail.com
X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7</SYF`{vYQ(&RI1&EiH[FvT;J}@f!4kfz
 x_!Y#=y{Uuj9GvUi=cPuajQ(Z42R[wE@{G,sn$qGr5g/wnb*"*ktI+,CD}1Z'wxrM2ag-r0p5I6\nA
 [WJopW_J.WY;
From: wmperry@aventail.com (William M. Perry)
Date: 11 May 1997 20:50:49 -0700
In-Reply-To: =?ISO-2022-JP?B?GyRCO1RAbkMjOkgbKEI=?= / Tatsuya Ichikawa's message of 12 May 1997 10:25:41 +0900
Message-ID: <86rafd4acm.fsf@kramer.in.aventail.com>
Lines: 66
X-Mailer: Gnus v5.4.49/Emacs 19.34

=?ISO-2022-JP?B?GyRCO1RAbkMjOkgbKEI=?= / Tatsuya Ichikawa <ichikawa@hv.epson.co.jp> writes:

> >>>>> In <m2g1vwbg3z.fsf@altair.xemacs.org> 
> >>>>>	Steven L Baur <steve@calag.com> wrote:
> 
> > >      AT&T UNIX SystemV/386 Release 4.0 Version 4.0(May be compatible with
> > >      SCO 3.2 or UnixWare).
> > >      X11R6/XFree86 3.1.2
> 
> > >   Does anyone has any idea why netstat's output state w3/XEmacs's tcp port 
> > >   "CLOSE_WAIT"?
> > >   Dose anyone be in same situation?
> 
> > I'm not sure this is an XEmacs problem.  Has this problem gone away or 
> > is it still present?  SCO and UnixWare are supported but receive
> > perhaps the lightest coverage from beta testers.
> 
>   Humm...This problem still present on my system.
> 
>   But wx/Emacs under FSF Emacs 19.34 works well.
>   It's strange for me.
> 
>   I heard from Shogo Fujii who is in same situation under NEC
>   EWS4800(SVR4.2MP).
> 
>   He said this problem presents below reason (may be). 
> 
>    XEmacs finaly read data using read system call.  But XEmacs opens
>   "O_NONBLOCK" mode , so read system call sets errno "EAGAIN" when
>   connection closed.  So , XEmacs process normal "EAGAIN"
>   procedure(Waitng data).
> 
>   Is this right ?

  I really do not think the TCP/IP stack should be returning EAGAIN in this
situation, but then UnixWare and friends are not exactly the worlds best
operating systems.

>   If this is right , how to know the connections status from file descriptor.

  If this is really what is happening, try this patch.  We would need to
wrap it in appropriate #if defined(EAGAIN) && !defined(UNIXWARE), etc.  But
this might get you going.  It at least doesn't break anything here under
linux.

-Bill P.

*** event-stream.c	1997/05/12 03:48:17	1.1
--- event-stream.c	1997/05/12 03:48:19
***************
*** 2854,2860 ****
  	else if (readstatus == -1 && errno == EWOULDBLOCK)
  	  ;
  #endif /* EWOULDBLOCK */
! #ifdef EAGAIN
  	else if (readstatus == -1 && errno == EAGAIN)
  	  ;
  #endif /* EAGAIN */
--- 2854,2860 ----
  	else if (readstatus == -1 && errno == EWOULDBLOCK)
  	  ;
  #endif /* EWOULDBLOCK */
! #ifdef 0
  	else if (readstatus == -1 && errno == EAGAIN)
  	  ;
  #endif /* EAGAIN */

