Article View: gnu.emacs.bug
Article #99066ESIX 5.3.2 D subprocess bug resolved
From: Kayvan Sylvan
Date: Sat, 08 Dec 1990 23:47
Date: Sat, 08 Dec 1990 23:47
380 lines
11686 bytes
11686 bytes
In GNU Emacs 18.55.31 of Sat Dec 8 1990 on satyr (usg-unix-v)
The solution to the subprocess bug I was encountering lay in FIONREAD.
The ESIX implementation of the FIONREAD ioctl is broken. It does not
work on pipes or ptys.
The emacs sources contain reference to BROKEN_FIONREAD, a define that
is settable by the m-*.h or s-*.h files that undefines FIONREAD.
Unfortunately, BROKEN_FIONREAD is only setup in dispnew.c and
keyboard.c and x11term.c.
Here are the diffs to make emacs-18.55 work correctly on ESIX.
*** dist-18.55/src/ChangeLog Fri Aug 18 15:02:45 1989
--- ChangeLog Sat Dec 8 14:43:46 1990
***************
*** 1,3 ****
--- 1,10 ----
+ Sat Dec 8 14:41:32 1990 Kayvan Sylvan (kayvan at satyr.UUCP)
+
+ * Added s-esix5-3.h. Changes to m-intel386.h for ESIX.
+
+ * Added BROKEN_FIONREAD section to process.c and sysdep.c,
+ plus xterm.c for completion.
+
Fri Aug 18 17:00:47 1989 Richard Stallman (rms at hobbes.ai.mit.edu)
* Version 18.55 released.
*** dist-18.55/src/m-intel386.h Tue Jul 25 22:40:58 1989
--- m-intel386.h Mon Dec 3 20:50:47 1990
***************
*** 124,135 ****
#else /* not XENIX */
#ifdef USG
#define LIB_STANDARD -lPW -lc
#define HAVE_ALLOCA
#define NO_REMAP
#define TEXT_START 0
#endif /* USG */
! #endif /* not XENIX */
#ifdef BSD
#define HAVE_ALLOCA
--- 124,139 ----
#else /* not XENIX */
#ifdef USG
+ #ifdef ESIX
+ #define LIB_STANDARD -lPW -lc -lbsd
+ #else /* not ESIX */
#define LIB_STANDARD -lPW -lc
+ #endif /* ESIX */
#define HAVE_ALLOCA
#define NO_REMAP
#define TEXT_START 0
#endif /* USG */
! #endif /* not ESIX */
#ifdef BSD
#define HAVE_ALLOCA
*** dist-18.55/src/process.c Sun Aug 6 15:01:31 1989
--- process.c Sat Dec 8 14:24:28 1990
***************
*** 63,71 ****
#else /* not IRIS, not UNIPLUS */
#ifdef HAVE_TIMEVAL
! #if defined(USG) && !defined(IBMRTAIX)
#include <time.h>
! #else /* IBMRTAIX or not USG */
#include <sys/time.h>
#endif /* IBMRTAIX or not USG */
#endif /* HAVE_TIMEVAL */
--- 63,71 ----
#else /* not IRIS, not UNIPLUS */
#ifdef HAVE_TIMEVAL
! #if defined(USG) && !defined(IBMRTAIX) && !defined(ESIX)
#include <time.h>
! #else /* IBMRTAIX or ESIX or not USG */
#include <sys/time.h>
#endif /* IBMRTAIX or not USG */
#endif /* HAVE_TIMEVAL */
***************
*** 139,144 ****
--- 139,150 ----
#endif
#endif /* BSD or UNIPLUS or STRIDE */
#endif /* no WAITTYPE */
+
+ /* Allow m- file to inhibit use of FIONREAD. */
+ #ifdef BROKEN_FIONREAD
+ #undef FIONREAD
+ #undef SIGIO
+ #endif
extern errno;
extern sys_nerr;
*** dist-18.55/src/sysdep.c Mon Aug 7 18:50:43 1989
--- sysdep.c Sat Dec 8 14:23:54 1990
***************
*** 127,132 ****
--- 127,136 ----
#ifdef XENIX
#undef TIOCGETC /* Avoid confusing some conditionals that test this. */
#endif
+ #ifdef ESIX
+ #undef TIOCGETC /* Avoid confusing some conditionals that test this. */
+ #undef TIOCGWINSZ
+ #endif
#ifndef HAVE_TERMIO
#ifndef VMS
***************
*** 150,156 ****
/* Some USG systems with TIOCGWINSZ need this file; some don't have it.
We don't know how to distinguish them.
If this #include gets an error, just delete it. */
! #include <sys/sioctl.h>
#endif
#endif
#endif
--- 154,160 ----
/* Some USG systems with TIOCGWINSZ need this file; some don't have it.
We don't know how to distinguish them.
If this #include gets an error, just delete it. */
! /*#include <sys/sioctl.h>*/
#endif
#endif
#endif
***************
*** 194,199 ****
--- 198,209 ----
#endif /* not SIGCHLD */
#endif /* SIGCLD */
#endif /* not VMS */
+
+ /* Allow m- file to inhibit use of FIONREAD. */
+ #ifdef BROKEN_FIONREAD
+ #undef FIONREAD
+ #undef SIGIO
+ #endif
static int baud_convert[] =
#ifdef BAUD_CONVERT
*** dist-18.55/src/xterm.c Wed Dec 28 20:09:23 1988
--- xterm.c Sat Dec 8 14:25:45 1990
***************
*** 80,85 ****
--- 80,91 ----
#define X_DEFAULT_FONT "vtsingle"
#endif
+ /* Allow m- file to inhibit use of FIONREAD. */
+ #ifdef BROKEN_FIONREAD
+ #undef FIONREAD
+ #undef SIGIO
+ #endif
+
#define min(a,b) ((a)<(b) ? (a) : (b))
#define max(a,b) ((a)>(b) ? (a) : (b))
#define sigunblockx(sig) sigblock (0)
*** /dev/null Mon Jun 11 15:57:26 1990
--- s-esix5-3.h Sat Dec 8 14:18:10 1990
***************
*** 0 ****
--- 1,212 ----
+ /* Definitions file for GNU Emacs running on AT&T's System V Release 3
+ Copyright (C) 1987 Free Software Foundation, Inc.
+
+ This file is part of GNU Emacs.
+
+ GNU Emacs is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY. No author or distributor
+ accepts responsibility to anyone for the consequences of using it
+ or for whether it serves any particular purpose or works at all,
+ unless he says so in writing. Refer to the GNU Emacs General Public
+ License for full details.
+
+ Everyone is granted permission to copy, modify and redistribute
+ GNU Emacs, but only under the conditions described in the
+ GNU Emacs General Public License. A copy of this license is
+ supposed to have been given to you along with GNU Emacs so you
+ can know your rights and responsibilities. It should be in a
+ file named COPYING. Among other things, the copyright notice
+ and this notice must be preserved on all copies. */
+
+
+ /*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+ #define ESIX
+ #define USG /* System III, System V, etc */
+
+ #define USG5
+
+ /* SYSTEM_TYPE should indicate the kind of system you are using.
+ It sets the Lisp variable system-type. */
+
+ #define SYSTEM_TYPE "usg-unix-v"
+
+ /* nomultiplejobs should be defined if your system's shell
+ does not have "job control" (the ability to stop a program,
+ run some other program, then continue the first one). */
+
+ #define NOMULTIPLEJOBS
+
+ /* Default is to set interrupt_input to 0: don't do input buffering within Emacs */
+
+ /* #define INTERRUPT_INPUT */
+
+ /* Letter to use in finding device name of first pty,
+ if system supports pty's. 'p' means it is /dev/ptyp0 */
+
+ #define FIRST_PTY_LETTER 'p'
+
+ /*
+ * Define HAVE_TERMIO if the system provides sysV-style ioctls
+ * for terminal control.
+ */
+
+ #define HAVE_TERMIO
+
+ /*
+ * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+ * Look in <sys/time.h> for a timeval structure.
+ */
+
+ #define HAVE_TIMEVAL
+ #define MISSING_UTIMES
+
+ /*
+ * Define HAVE_SELECT if the system supports the `select' system call.
+ */
+
+ /* #define HAVE_SELECT */
+
+ /*
+ * Define HAVE_PTYS if the system supports pty devices.
+ */
+
+ /* Some versions of V.3 have this, but not all. ESIX does. */
+ #define HAVE_PTYS
+ #define SYSV_PTYS
+
+ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
+
+ /* #define HAVE_SOCKETS */
+
+ /*
+ * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
+ * The 4.2 opendir, etc., library functions.
+ */
+
+ /* #define NONSYSTEM_DIR_LIBRARY */
+
+ /*
+ * Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir
+ * library functions. Almost, but not quite the same as
+ * the 4.2 functions
+ */
+ #define SYSV_SYSTEM_DIR
+
+ /* Define this symbol if your system has the functions bcopy, etc. */
+
+ /* #define BSTRING */
+
+ /* subprocesses should be defined if you want to
+ have code for asynchronous subprocesses
+ (as used in M-x compile and M-x shell).
+ This is supposed to work now on system V release 2. */
+
+ #define subprocesses
+
+ /* If your system uses COFF (Common Object File Format) then define the
+ preprocessor symbol "COFF". */
+
+ #define COFF
+
+ /* define MAIL_USE_FLOCK if the mailer uses flock
+ to interlock access to /usr/spool/mail/$USER.
+ The alternative is that a lock file named
+ /usr/spool/mail/$USER.lock. */
+
+ /* #define MAIL_USE_FLOCK */
+
+ /* Define CLASH_DETECTION if you want lock files to be written
+ so that Emacs can tell instantly when you try to modify
+ a file that someone else has modified in his Emacs. */
+
+ /* #define CLASH_DETECTION */
+
+ /* Define SHORTNAMES if the C compiler can distinguish only
+ short names. It means that the stuff in ../shortnames
+ must be run to convert the long names to short ones. */
+
+ /* #define SHORTNAMES */
+
+ /* We use the Berkeley (and usg5.2.2) interface to nlist. */
+
+ #define NLIST_STRUCT
+
+ /* The file containing the kernel's symbol table is called /unix. */
+
+ #define KERNEL_FILE "/unix"
+
+ /* The symbol in the kernel where the load average is found
+ is named avenrun. */
+
+ #define LDAV_SYMBOL "avenrun"
+
+ /* Define this if system V IPC is available. */
+
+ #define HAVE_SYSVIPC
+
+ /* Special hacks needed to make Emacs run on this system. */
+
+ /*
+ * Make the sigsetmask function go away. Don't know what the
+ * ramifications of this are, but doesn't seem possible to
+ * emulate it properly anyway at this point.
+ */
+
+ /*#define sigsetmask(mask) /* Null expansion */
+
+ /* setjmp and longjmp can safely replace _setjmp and _longjmp,
+ but they will run slower. */
+
+ #define _setjmp setjmp
+ #define _longjmp longjmp
+
+ /* On USG systems the system calls are interruptable by signals
+ that the user program has elected to catch. Thus the system call
+ must be retried in these cases. To handle this without massive
+ changes in the source code, we remap the standard system call names
+ to names for our own functions in sysdep.c that do the system call
+ with retries. */
+
+ #define read sys_read
+ #define write sys_write
+ #define open sys_open
+ #define close sys_close
+
+ #define INTERRUPTABLE_OPEN
+ #define INTERRUPTABLE_CLOSE
+ #define INTERRUPTABLE_IO
+
+ /* On USG systems these have different names */
+
+ #define index strchr
+ #define rindex strrchr
+
+ /* USG systems tend to put everything declared static
+ into the initialized data area, which becomes pure after dumping Emacs.
+ Foil this. Emacs carefully avoids static vars inside functions. */
+
+ #define static
+
+ /* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
+
+ #define ADDR_CORRECT(x) (x)
+
+ /* Prevent -lg from being used for debugging. Not implemented? */
+
+ #define LIBS_DEBUG -lg
+
+ /* Use terminfo instead of termcap. */
+
+ #define TERMINFO
+
+ /* X needs to talk on the network, so search the network library. */
+
+ #define LIBX10_SYSTEM -lnsl_s
+ #define LIBX11_SYSTEM -lnsl_s
+
+ /* ESIX has FIONREAD, but it doesn't work right on the ptys or pipes */
+ #define BROKEN_FIONREAD
Technical Details
Message-ID:
<m0iiEGZ-00082zC@satyr.uucp>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!EDDIE.MIT.EDU!think!satyr!kayvanShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,9e10ae62dbcb6e73,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-12-08 15:47:00 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!EDDIE.MIT.EDU!think!satyr!kayvan From: think!satyr!kayvan@EDDIE.MIT.EDU (Kayvan Sylvan) Newsgroups: gnu.emacs.bug Subject: ESIX 5.3.2 D subprocess bug resolved Message-ID: <m0iiEGZ-00082zC@satyr.uucp> Date: 8 Dec 90 23:47:00 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 380 Approved: bug-gnu-emacs@prep.ai.mit.edu Posted: Sun Dec 9 00:47:00 1990