bjaspan@athena.mit.EDU ("Barr3y Jaspan") (06/28/91)
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)
gprieur@pyramid.pyramid.com (Gordon Prieur) (06/29/91)
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
klg@tc.fluke.COM (Kevin L. Gross) (06/29/91)
In <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 had the same problem. UHC suggested I run ksh. Although I was hesitant to switch from csh, and there was a definite learning curve lessened only by the use of ksh where I work, I find ksh to be very useful as well as being able to use job control. -- -Kevin L. Gross klg@Fluke.COM Disclaim THIS: "The only thing that separates us from the animals is pointless ritual and mindless superstition." - Latka Gravis