From owner-taylor-uucp@gnu.ai.mit.edu Tue May  5 18:55:56 1992
Status: RO
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	["1436" "Tue" "5" "May" "92" "9:47:45" "-0400" "Ian Lance Taylor" "ian@airs.com " nil "55" "Re: Dialing problem w/1.03 on SCO XENIX" "^From:" nil nil "5"])
Received: from fuug.fi by dolphin.funet.fi with SMTP id AA25241
  (5.65c/IDA-1.4.3 for ojala); Tue, 5 May 1992 18:55:54 +0300
Received: from churchy.gnu.ai.mit.edu by fuug.fi with SMTP id AA07411
  (5.65c/IDA-1.4.4 for <taylor-uucp-list@fuug.fi>); Tue, 5 May 1992 18:52:36 +0300
Received: by churchy.gnu.ai.mit.edu (5.65/4.0)
	id <AA04066@churchy.gnu.ai.mit.edu>; Tue, 5 May 92 11:00:10 -0400
Received: from relay2.UU.NET by churchy.gnu.ai.mit.edu (5.65/4.0) with SMTP
	id <AA04061@churchy.gnu.ai.mit.edu>; Tue, 5 May 92 11:00:07 -0400
Received: from uunet.uu.net (via LOCALHOST.UU.NET) by relay2.UU.NET with SMTP 
	(5.61/UUNET-internet-primary) id AA24463; Tue, 5 May 92 11:00:16 -0400
Received: from airs.UUCP by uunet.uu.net with UUCP/RMAIL
	(queueing-rmail) id 105949.5547; Tue, 5 May 1992 10:59:49 EDT
Received: by comton.airs.com (5.57/AIRS1.0)
	id AA00850; Tue, 5 May 92 09:47:46 -0400
Message-Id: <9205051347.AA00850@comton.airs.com>
In-Reply-To:  <9205050445.aa24968@ksvltd.FI>; from "Jarmo Raiha" at May 5, 92 7:45 am
X-Mailer: ELM [version 2.3 PL11]
From: ian@airs.com (Ian Lance Taylor)
To: taylor-uucp@gnu.ai.mit.edu
Subject: Re: Dialing problem w/1.03 on SCO XENIX
Date: Tue, 5 May 92 9:47:45 -0400

Jarmo Raiha writes:

> 1) open with O_NDELAY
> 2) ioctl using CLOCAL and VMIN=1 , VTIME=0
> 3) open it again now without O_NDELAY
> 4) close the first handle , use that second one.

Thanks for the info.  If anybody would like to try this, here's a
patch for sys2.unx.  Obviously, I don't recommend it for anybody who's
not having trouble.  Please let me know if it helps.

*** code/uucp-archive/uucp-1.03/sys2.unx	Tue Apr  7 01:05:27 1992
--- sys2.unx	Tue May  5 09:45:34 1992
***************
*** 1072,1077 ****
--- 1072,1104 ----
        return FALSE;
      }
  
+   /* Apparently on SCO you sometimes have to reopen the port.  */
+   if (z != NULL && ! fwait)
+     {
+       int onew;
+ 
+       if (*z != '/')
+ 	{
+ 	  char *zcopy;
+ 
+ 	  zcopy = (char *) alloca (sizeof "/dev/" + strlen (z));
+ 	  sprintf (zcopy, "/dev/%s", z);
+ 	  z = zcopy;
+ 	}
+ 
+       onew = open (z, O_RDWR);
+       if (onew < 0)
+ 	{
+ 	  ulog (LOG_ERROR, "open (%s): %s", z, strerror (errno));
+ 	  return FALSE;
+ 	}
+ 
+       (void) close (q->oread);
+ 
+       q->oread = onew;
+       q->owrite = onew;
+     }
+ 
    if (ibaud != 0)
      q->ibaud = ibaud;
    else

-- 
Ian Lance Taylor                ian@airs.com                uunet!airs!ian
First person to identify this quote wins a free e-mail message:
``They were all-but forgotten people: the breed that was remembered with a
  start, or with the unreality of a recrudescent dream.''

