Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!spool.mu.edu!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!lance!ptcburp!rick From: rick@ptcburp.ptcbu.oz.au (Rick Stevenson) Newsgroups: comp.sys.pyramid Subject: Re: xterm problem with ioctl Message-ID: <397@ptcburp.ptcbu.oz.au> Date: 12 Apr 91 12:38:26 GMT References: <1991Apr12.041012.9878@geac.com> Organization: Pyramid Technology Corporation Lines: 69 wcm@geac.com (W Christopher Martin) writes: >I've compiled the X11R4 package under the ucb universe on our Pyramid >(att uname -a = "OSx120M pyrogy 5.1a-900725 0409e MIS-2/02") and >everything works great except for xterm. It complains about >"Error 16, errno 25: Inappropriate I/O control operation" which I've >tracked down to the TIOCGETC in main.c. The only changes I had to make to R4 xterm to get it to run on our machine (OS equivalent to OSx5.1) were as follows: *** main.c- Mon Apr 9 08:30:54 1990 --- main.c Fri Oct 19 11:07:27 1990 *************** *** 115,120 #define ttyslot() 1 #endif /* apollo */ #include #ifdef LASTLOG #include --- 115,125 ----- #define ttyslot() 1 #endif /* apollo */ + #ifdef pyr + #define UTMP_FILENAME "/etc/.ucbutmp" + #define WTMP_FILENAME "/etc/.ucbwtmp" + #endif + #include #ifdef LASTLOG #include *************** *** 1721,1727 #endif ioctl(0, TIOCSPGRP, (char *)&pgrp); setpgrp(0,0); ! close(open(ttydev, O_WRONLY, 0)); setpgrp (0, pgrp); #endif /* USE_SYSV_PGRP */ --- 1726,1737 ----- #endif ioctl(0, TIOCSPGRP, (char *)&pgrp); setpgrp(0,0); ! /* ! * This open was previously O_WRONLY which caused problems ! * because of OSx /dev/tty hole protection. ! * Rick Stevenson, APRIL 90. ! */ ! close(open(ttydev, O_RDWR, 0)); setpgrp (0, pgrp); #endif /* USE_SYSV_PGRP */ The utmp/wtmp stuff stops ugly things happening if you invoke xterm from the ATT universe (like corruption of the ATT utmp/wtmpfiles). From memory I think the other mod fixes a problem with access to /dev/tty being denied. I don't recall the symptoms of this being exactly as you describe. Mail me if this doesn't help. Rick. -- Rick Stevenson Pyramid Technology Corporation +61 75 522475 FAX Research Park, Bond University +61 75 950249 VOICE Gold Coast, Q 4229, AUSTRALIA rick@ptcburp.oz.au