Article View: comp.sources.bugs
Article #2260Re: atty on Sun 3
From: roy
Date: Sun, 04 Jun 1989 16:24
Date: Sun, 04 Jun 1989 16:24
47 lines
2414 bytes
2414 bytes
/* Written 4:49 pm Jun 3, 1989 by guy@auspex.UUCP in sts:comp.sources.bugs */
>Atty core dumps because it calls abort. It calls abort because an pty
>ioctl fails. The ioctl fails because it tries to set terminal modes
>on the master side of the pty instead of on the slave side.
>
>I don't know if that's possible on other systems but it won't work on
>SunOS 4.0 suns, see the enclosed program:
OK, here's the scoop.
.
.
.
However, there is a truly slimy kludge in the 4.0 pseudo-tty
driver that lets it work *most* of the time for the *BSD*
terminal "ioctl"s. It does *not* work for the System V-style
.
.
.
The following patch to "atty.c" seemed to fix the problem (I was able to
start "atty" up, and type at it a bit, at least); it moves the setting
of the initial pseudo-tty modes from code in the parent which bangs on
the master side to code in the child that bangs on the slave side after
it's opened):
*** atty.c.ORIG Sat Jun 3 16:25:00 1989
--- atty.c Sat Jun 3 16:34:32 1989
/* End of text from sts:comp.sources.bugs */
I applied the patch to atty.c and re-compiled with gcc. The result
was that I'm able to get the initial prompt and type a few characters,
but when I hit Return, I get the same core dump as before and,
apparently, for the same reason. Naturally, since atty(1) is not
meant to run under System V and SunOS 4.0 is partially based on System
V, it doesn't work too well here.
My fix is to run ash(1) under the cmushell in GNU Emacs. That way, I
get the Emacs editing power as well as command history.
==================================================================
Roy Bixler | UUCP: ...!{claris,sun}!sts!roy |
Semiconductor Test Solutions | Internet: sts!roy@Claris.COM |
4101 Burton Dr. | phones: (408) 727-2885 x132 (work)|
Santa Clara, CA 95054 | (408) 289-1035 (home)|
==================================================================
Technical Details
Message-ID:
<68400002@sts>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun-barr!apple!claris!sts!royReferences:
<280@kurz-ai.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun-barr!apple!claris!sts!roy From: roy@sts.sts.UUCP Newsgroups: comp.sources.bugs Subject: Re: atty on Sun 3 Message-ID: <68400002@sts> Date: 4 Jun 89 16:24:00 GMT References: <280@kurz-ai.UUCP> Lines: 47 Nf-ID: #R:kurz-ai.UUCP:280:sts:68400002:000:1956 Nf-From: sts.sts.UUCP!roy Jun 4 09:24:00 1989