Article View: gnu.emacs.bug
Article #119918.52 process.c fix for SysV with ptys
From: Erik Murrey
Date: Wed, 23 Nov 1988 02:16
Date: Wed, 23 Nov 1988 02:16
71 lines
2482 bytes
2482 bytes
GNU Emacs 18.52.4 of Tue Nov 22 1988 on mpx2 (xenix)
(This may be old news, for all I know...)
Problem:
Inferior shells on System-V Unix-es with ptys do
not get a controlling terminal.
Repeat By:
Run an inferior shell. Try to echo something to /dev/tty.
error: /dev/tty cannot create.
A "ps" will also show a ? in the TTY column.
Fix:
In process.c, the setpgrp() code in create_process() doesn't
get compiled in unless you have TIOCNOTTY defined. I don't
think that TIOCNOTTY would be defined under AT&T Sys-V.
In any case, it wasn't on my Xenix System-V box.
To fix it, I moved the #endif of TIOCNOTTY up above the
test for USG:
It worked for me... mileage may vary...
*** emacs18_52/src/process.c.ORIG Sat Aug 20 10:27:41 1988
--- emacs18_52/src/process.c Tue Nov 22 17:53:03 1988
***************
*** 998,1004
int j = open ("/dev/tty", O_RDWR, 0);
ioctl (j, TIOCNOTTY, 0);
close (j);
!
#if !defined (RTU) && !defined(UNIPLUS)
#ifdef USG
setpgrp ();
--- 998,1006 -----
int j = open ("/dev/tty", O_RDWR, 0);
ioctl (j, TIOCNOTTY, 0);
close (j);
! }
! #endif /* TIOCNOTTY */
! if (ptyname) {
#if !defined (RTU) && !defined(UNIPLUS)
#ifdef USG
setpgrp ();
***************
*** 1012,1018
abort ();
#endif /* not UNIPLUS and not RTU */
}
- #endif /* TIOCNOTTY */
#endif /* HAVE_PTYS */
child_setup_tty (xforkout);
child_setup (xforkin, xforkout, xforkout, new_argv, env);
--- 1014,1019 -----
abort ();
#endif /* not UNIPLUS and not RTU */
}
#endif /* HAVE_PTYS */
child_setup_tty (xforkout);
child_setup (xforkin, xforkout, xforkout, new_argv, env);
--
Erik Murrey /| // /~~~~/ | /
MPX Data Systems, Inc. / | / / /____/ |/
erik@mpx2.UUCP / / / / /| Data Systems, Inc.
{spl1,vu-vlsi,bpa}!mpx1!erik / / / / |====================
Technical Details
Message-ID:
<281@mpx2.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!pyramid!cbmvax!vu-vlsi!mpx1!mpx2!erikShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!pyramid!cbmvax!vu-vlsi!mpx1!mpx2!erik From: erik@mpx2.UUCP (Erik Murrey) Newsgroups: gnu.emacs.bug Subject: 18.52 process.c fix for SysV with ptys Keywords: setprgp() doesn't get compiled in... Message-ID: <281@mpx2.UUCP> Date: 23 Nov 88 02:16:43 GMT Reply-To: erik@mpx2.UUCP (Erik Murrey) Organization: MPX Data Systems, Inc. , Wayne, PA Lines: 71