[unix-pc.general] rn fix for OBM usage

lenny@icus.UUCP (Lenny Tropiano) (07/11/88)

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