Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!brazeau.ucs.ualberta.ca!unixg.ubc.ca!ubc-cs!uw-beaver!zephyr.ens.tek.com!uunet!cis.ohio-state.edu!ucbvax!hplabs!pyramid!gprieur From: gprieur@pyramid.pyramid.com (Gordon Prieur) Newsgroups: comp.windows.x Subject: Re: xterm on Sys V R4 Message-ID: <160884@pyramid.pyramid.com> Date: 28 Jun 91 17:06:15 GMT References: <9106280017.AA15991@podge> Reply-To: gprieur@pyramid.pyramid.com (Gordon Prieur) Organization: Pyramid Technology Corp., Mountain View, CA Lines: 71 In article <9106280017.AA15991@podge> bjaspan@athena.mit.EDU ("Barr3y Jaspan") writes: > >Has anyone successfully ported X11R4's xterm to Sys V R4 in a way that >supports job control? I can get it to work by not defining >USE_HANDSHAKE but then the shell (/bin/csh) produces > >Warning: no access to tty; thus no job control in this shell... > >I never got around to learning all about ttys and such and would >prefer not to have to. :-) > >Thanks. > >Barr3y Jaspan, bjaspan@mit.edu >Student Information Processing Board (SIPB) We are running X (and xterm) on our implementation of SVR4 with no problems. You probably need to push some stream modules. Here is what we did to make job control work. This code is in the ``spawn'' function of main.c. if (screen->pid == 0) { /* * now in child process */ extern char **environ; int pgrp = getpid(); #ifdef USE_SYSV_TERMIO char numbuf[12]; #endif /* USE_SYSV_TERMIO */ #ifndef USE_HANDSHAKE int ptyfd; setpgrp(); grantpt (screen->respond); unlockpt (screen->respond); if ((ptydev =(char *)ptsname(screen->respond))==NULL){ fprintf(stderr,"couldn't enable slave pty"); } if ((ptyfd = open (ptydev, O_RDWR)) < 0) { SysError (1); } if (ioctl (ptyfd, I_PUSH, "ptem") < 0) { SysError (2); } if (ioctl (ptyfd, I_PUSH, "ldterm") < 0) { SysError (4); } /* hacked from /cmd/cmd-inet/usr.sbin/in.rlogin.c pyramid */ if (ioctl (ptyfd,I_PUSH, "ttcompat") <0) { SysError (5); } /* end of hack */ tty = ptyfd; close (screen->respond); #ifdef TIOCSWINSZ /* tell tty how big window is */ . . . I'm sorry I can't send a context diff, but I can't access my RCS history until another machine comes up. I think the ttcompat push is the one we had to add, and the other pushes are in the MIT code. -- Gordon Prieur -m------- Pyramid Technology Corporation ---mmm----- 1295 Charleston Rd, P.O. Box 7295 -----mmmmm--- Mt. View, CA 94039-7295 (415) 335-8533