From xemacs-m  Tue May 20 00:14:32 1997
Received: from epsongw2.epson.co.jp (epsongw2.epson.co.jp [202.248.17.20])
	by xemacs.org (8.8.5/8.8.5) with SMTP id AAA03126;
	Tue, 20 May 1997 00:14:25 -0500 (CDT)
Received: from epsongw.epson.co.jp by epsongw2.epson.co.jp (8.6.12+2.4W/3.4W-MX950731-Epson Mail Gateway) id OAA11079; Tue, 20 May 1997 14:16:15 +0900
Received: from hv.epson.co.jp by epsongw.epson.co.jp (8.6.12+2.4W/3.4W-97040115) id OAA23319; Tue, 20 May 1997 14:10:56 +0900
Received: from hv08.hv.epson.co.jp (hv08 [163.141.23.108]) by hv.epson.co.jp (8.6.12+2.5Wb7/3.3W-ESD-MAIL-GW1996/01/17) with ESMTP id OAA03535; Tue, 20 May 1997 14:13:13 +0900
Received: (from ichikawa@localhost) by hv08.hv.epson.co.jp (8.8.2+2.6Wbeta9/3.5W-AT-ESD hv08 11/12/96) id OAA01631; Tue, 20 May 1997 14:13:58 +0900 (JST)
From: =?ISO-2022-JP?B?GyRCO1RAbkMjOkgbKEI=?= / Tatsuya Ichikawa
 <ichikawa@hv.epson.co.jp>
To: Steven L Baur <steve@xemacs.org>, 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> <86rafd4acm.fsf@kramer.in.aventail.com> <wnwwp24id0.fsf@hv08.hv.epson.co.jp> <m267wmtrve.fsf@altair.xemacs.org>
X-Emacs: XEmacs 20.2
X-MUA: gnus-mime 0.22 (for SEMI) + SEMI MIME view 0.88
Original-Original-Sender: ichikawa@hv.epson.co.jp
Organization: Tatsuya Ichikawa Supporter Club.
X-PGP-Sig: 2.6.3ia Subject,Message-ID,Date,From,X-Mailer,X-Face
	iQBVAwUBM4EwTXiR0oMKLWWZAQGLxgIAnIPR9DX6Z2UiFKRljQwEnonUatAT4q3v
	dpPqXUDGpAJmAxngymEhH6Fw+0AbXoMJFNYfZIVhZHB/87WtE8H0FQ==
	=yLvs
X-Face-Version: X-Face utilities v1.2.5
X-Face: ?/"MXina;Tt'.c6A>P1["3Wm#HCKX-/DEGN$1y[T?I6fCGFUTh]6'<@mJ&1TSRDlc_>|Lo'
 %b|.R<f|%BIjCOSQvLV:2)P^04)ek{b"Non9NuWOEk;\0td2/ema6)OY@T[SPgNY3z[;uPIjxx>wf=
 `7~U>E@VElJ`RI\Sb1h
Mime-Version: 1.0 (generated by SEMI MIME-Edit 0.80)
Content-Type: multipart/mixed;
 boundary="Multipart_Tue_May_20_14:02:04_1997-1"
Content-Transfer-Encoding: 7bit
In-Reply-To: Steven L Baur's message of 14 May 1997 00:49:57 -0700
X-Mailer: Gnus v5.4.53 with SEMI patch/XEmacs 20.2
Date: 20 May 1997 14:13:58 +0900
Message-ID: <wn3eriene1.fsf@hv08.hv.epson.co.jp>
Lines: 166

--Multipart_Tue_May_20_14:02:04_1997-1
Content-Type: text/plain; charset=US-ASCII


First Sorry for my poor English.

;; I want Japanese version of XEmacs beta tester's ML.

>>>>> In <m267wmtrve.fsf@altair.xemacs.org> 
>>>>>	Steven L Baur <steve@xemacs.org> wrote:

> >   Do you need this patch right now ?
> Not any more.  Collect the patch from him when convenient, and we'll
> put it on an XEmacs 20.2 patch page (if we find a maintainer for it)
> and get the fix permanently into 20.3.

  Hello Steven and XEmacs beta testers.

  Mr. Shogo Fujii creates a new patch that works w3/XEmacs on NEC
  EWS4800(SVR4.2MP) and on my system.

  This patch is only available under w3/XEmacs freeze and w3/XEmacs's port 
  status that can see "netstat" command becomes "CLOSE_WAIT".

  Following is a way how to work with this patch

   1. Apply this patch
   2. Define #define PROCESS_IO_BLOCKING in your system dependent file 
      or specify --cflags="-DPROCESS_IO_BLOCKING" and re-configure.
   3. Re-make XEmacs
   4. Add following description in your .emacs

	;;; Specify the port that works with non-blocking IO mode.
	(if (boundp 'network-stream-blocking-port-list)
	    (setq network-stream-blocking-port-list '( 80 3128 ))
	  )

  When I apply this patch and re-make XEmacs , w3/XEmacs works fine on my 
  system.

  Following is a patch for this probrem.


--Multipart_Tue_May_20_14:02:04_1997-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="process.c.diff"
Content-Transfer-Encoding: 7bit

--- src/process.c.ORIG	Thu Apr 24 13:00:54 1997
+++ src/process.c	Mon May 12 15:06:47 1997
@@ -69,6 +69,12 @@
    maybe other values to come.  */
 static Lisp_Object Vprocess_connection_type;
 
+#ifdef PROCESS_IO_BLOCKING
+/* List of port numbers or port names to set a blocking I/O mode.
+   Nil means set a non-blocking I/O mode [default]. */
+static Lisp_Object network_stream_blocking_port_list;
+#endif  /* PROCESS_IO_BLOCKING */
+
 /* FSFmacs says:
 
    These next two vars are non-static since sysdep.c uses them in the
@@ -1496,7 +1502,37 @@
 
   descriptor_to_process[inch] = proc;
 
+#ifdef PROCESS_IO_BLOCKING
+  {
+    Lisp_Object tail;
+
+    for (tail = network_stream_blocking_port_list; CONSP (tail); tail = XCDR (tail))
+      {
+	Lisp_Object tail_port = XCAR (tail);
+	int block_port;
+
+	if (STRINGP (tail_port))
+	  {
+	    struct servent *svc_info;
+	    CHECK_STRING (tail_port);
+	    svc_info = getservbyname ((char *) XSTRING_DATA (tail_port), "tcp");
+	    if ((svc_info != 0) && (svc_info->s_port == port))
+		break;
+	    else
+	      continue;
+	  }
+	else if ((INTP (tail_port)) && (htons ((unsigned short) XINT (tail_port)) == port))
+	  break;
+      }
+
+    if (!CONSP (tail))
+      {
+#endif	/* PROCESS_IO_BLOCKING */
   set_descriptor_non_blocking (inch);
+#ifdef PROCESS_IO_BLOCKING
+      }
+    }
+#endif	/* PROCESS_IO_BLOCKING */
 
   XPROCESS (proc)->pid = Fcons (service, host);
   XPROCESS (proc)->buffer = buffer;
@@ -3395,6 +3431,15 @@
 The value takes effect when `start-process' is called.
 */ );
   Vprocess_connection_type = Qt;
+
+#ifdef PROCESS_IO_BLOCKING
+  DEFVAR_LISP ("network-stream-blocking-port-list", &network_stream_blocking_port_list /*
+List of port numbers or port names to set a blocking I/O mode with connection.
+Nil value means to set a default(non-blocking) I/O mode.
+The value takes effect when `open-network-stream-internal' is called.
+*/ );
+  network_stream_blocking_port_list = Qnil;
+#endif	/* PROCESS_IO_BLOCKING */
 }
 
 #endif /* not NO_SUBPROCESSES */

--Multipart_Tue_May_20_14:02:04_1997-1
Content-Type: text/plain; charset=US-ASCII


  Mr Shogo Fujii's environment and mine have common feature - that is - both
  operating systems are AT&T Based SVR4 and SVR4.2.
  Both configuration creats a config.h that includes usg5-4.h I think.

  So I create a patch for SVR4 and SVR4.2 to use PROCESS_IO_BLOCKING.

  Following is a patch.


--Multipart_Tue_May_20_14:02:04_1997-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="usg5-4.h.diff"
Content-Transfer-Encoding: 7bit

*** usg5-4.h.orig	Tue May 20 13:56:11 1997
--- usg5-4.h	Tue May 20 13:57:51 1997
***************
*** 176,178 ****
--- 176,181 ----
  
  /* Tell x11term.c and keyboard.c we have the system V streams feature.  */
  #define SYSV_STREAMS
+ /* On Some SysV System , w3 freeze. If freeze your xemacs , Add below definition */
+ /* This definition added by Shogo Fujii(shogo@bsd1.kbnes.nec.co.jp) */
+ #define PROCESS_IO_BLOCKING


--Multipart_Tue_May_20_14:02:04_1997-1
Content-Type: text/plain; charset=US-ASCII


  If defined PROCESS_IO_BLOCKING in all SVR4 system , w3/XEmacs works fine under
  all SVR4 system if variable network-stream-blocking-port-list set or unset.


  Thanks.

--
Tatsuya Ichikawa : Epson Software Development Lab, Inc. Nagano, Japan. ;-)
# PGP Public Key : pgp-public-keys@keys.pgp.net(Subject: GET 0x0A2D6599)
       E-mail    : <ichikawa@hv.epson.co.jp><t-ichi@po.shiojiri.ne.jp>
end

--Multipart_Tue_May_20_14:02:04_1997-1--

