Path: utzoo!utgpu!water!watmath!uunet!labrea!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!att!icus!lenny
From: lenny@icus.UUCP (Lenny Tropiano)
Newsgroups: unix-pc.general
Subject: rn fix for OBM usage (was Re: 3.51a keeps dying; even HDB is ...)
Message-ID: <420@icus.UUCP>
Date: 11 Jul 88 05:47:41 GMT
References: <422@kosman.UUCP> <1041@flatline.UUCP> <415@icus.UUCP> <289@argon.UUCP>
Reply-To: lenny@icus.UUCP (Lenny Tropiano)
Distribution: unix-pc
Organization: ICUS Software Systems, Islip, New York
Lines: 62

In article <289@argon.UUCP> ebh@argon.UUCP (Ed Horch) writes:
...
|>Speaking of bugs....
|>
|>Can somebody send me the fix to rn to get around the "Can't open 
|>/dev/tty" message when dialing in from the OBM?
|>
Ok, it's a fix for one or two lines.  I did this on my machine, and posted
this awhile ago.  It's the the "offical" fix, if there is one.  I know
it works thought :-)

This is in the file term.c (sorry this isn't in patch format):

---
/* set terminal characteristics */

void
term_set(tcbuf)
char *tcbuf;		/* temp area for "uncompiled" termcap entry */
{
    char *tmpaddr;			/* must not be register */
    register char *tmpstr;
    char *tgetstr();
    char *s;
    int status;

#ifdef PENDING
#ifndef FIONREAD
    /* do no delay reads on something that always gets closed on exit */

    /* devtty = open("/dev/tty",0); */
    devtty = open("/dev/tty",O_RDWR|O_NDELAY); 
    if (devtty < 0) {
	printf(cantopen,"/dev/tty") FLUSH;
	finalize(1);
    }
    /* fcntl(devtty,F_SETFL,O_NDELAY); */
#endif
#endif
    
    /* get all that good termcap stuff */

---
The only line you need to change/comment are those open and fcntl lines.

|>Also, is there any fix or workaround to the famous lost-inode problem
|>that occurs most often during news unbatching?  It's a real pain, more
|>because of its seemingly complete randomness than anything else.
|>
No, because this isn't just an UNIX pc bug... It seems to happen on
all System V machines I've used.  I don't know what causes this though, but
to periodically do a "fsck" will fix this unallocated i-nodes...

-Lenny
-- 
Paper-net: Lenny Tropiano          | @-net:         lenny@icus.UUCP
           ICUS Software Systems   | !-net:      ...att    \
           PO Box 1                |                boulder \
           Islip Terrace, NY 11752 |                talcott  !icus!lenny
Vocal-net: (516) 582-5525 [work]   |                pacbell /
           (516) 968-8576 [home]   |                sbcs   /
Telex-net: 154232428 ICUS          | Another-net:   attmail!icus!lenny