Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!ubc-cs!pphillip From: pphillip@cs.ubc.ca (Peter Phillips) Newsgroups: comp.sys.mips Subject: Re: Patches to RISC/OS 4.5 for MIT X11R4 Message-ID: <1991Feb22.231942.20198@cs.ubc.ca> Date: 22 Feb 91 23:19:42 GMT References: <1991Feb15.211308.27835@convex.com> <1991Feb18.222802.2669@cs.ubc.ca> Sender: news@cs.ubc.ca (Usenet News) Organization: University of British Columbia, Vancouver, B.C., Canada Lines: 77 In article k2@bl.physik.tu-muenchen.de (Klaus Steinberger) writes: >pphillip@cs.ubc.ca (Peter Phillips) writes: > > >>We've been using the libraries and clients from X11R4 on our R3260 >>under RiscOS 4.51 for quite some time now but have run into a small >>problem with xterm. > >>If an xterm is started from a login which has no controlling tty (like >>from /usr/ucb/rsh) then the xterm will not get a controlling tty. The >>lack of a controlling tty breaks programs like "su" and "script". >>This problem doesn't occur under other UNIX machines running X11R4 nor >>does it occur using xterm from RiscWindows 3.21. > >I'm also running into this problem, I'm very very interested in a >solution. I have no idea, why this happened. > >Sincerely, >Klaus Steinberger > >-- >Klaus Steinberger Beschleunigerlabor der TU und LMU Muenchen >Phone: (+49 89)3209 4287 Hochschulgelaende >FAX: (+49 89)3209 4280 D-8046 Garching, Germany >BITNET: K2@DGABLG5P Internet: k2@bl.physik.tu-muenchen.de I now have a fix for this thanks to . It turns out that the BSD setpgrp system call doesn't work properly. The fix is to use the SYSV setpgrp call. To do, make sure that HAS_SYSV_SETPGRP is defined in main.c in the xterm source code. Then, when linking xterm, use the setpgrp.o object file from /lib/libc.a to make sure that the right setpgrp is used. I've put the diffs for Imakefile and main.c at the end of this message. Our mips.cf file uses the symbol MIPS to indicate compilation under RiscOS. -- Peter Phillips, pphillip@cs.ubc.ca | "It's worse than that ... He has {alberta,uunet}!ubc-cs!pphillip | no brain." -- McCoy, "Spock's Brain" ---- cut here -------------------- *** Imakefile Tue Apr 3 20:04:14 1990 --- /staff/pphillip/tmp/xterm2/Imakefile Wed Feb 20 00:51:14 1991 *************** *** 40,46 **** --- 40,52 ---- main.c menu.c misc.c screen.c scrollbar.c tabs.c \ TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c + #ifdef MIPS OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o \ screen.o scrollbar.o button.o Tekproc.o misc.o \ + VTPrsTbl.o TekPrsTbl.o data.o menu.o setpgrp.o + #else /* MIPS */ + OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o \ + screen.o scrollbar.o button.o Tekproc.o misc.o \ VTPrsTbl.o TekPrsTbl.o data.o menu.o + #endif /* MIPS */ SRCS2 = resize.c OBJS2 = resize.o *************** *** 82,83 **** --- 88,94 ---- InstallManPage(resize,$(MANDIR)) DependTarget() + + #ifdef MIPS + setpgrp.o: + ar x /lib/libc.a setpgrp.o + #endif /* MIPS */ *** main.c Sun Feb 18 20:25:21 1990 --- /staff/pphillip/tmp/xterm2/main.c Tue Feb 19 23:35:22 1991 *************** *** 109,112 **** --- 109,113 ---- #undef HAS_UTMP_UT_HOST #define USE_SYSV_UTMP + #define USE_SYSV_PGRP #endif Brought to you by Super Global Mega Corp .com