home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / emacs / bug / 1693 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.5 KB  |  49 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!elf.tn.cornell.edu!eirik
  2. From: eirik@elf.tn.cornell.edu (Eirik Fuller)
  3. Newsgroups: gnu.emacs.bug
  4. Subject: core dump in x_io_error_handler
  5. Date: 25 Jan 1993 20:22:12 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 36
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-gnu-emacs@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <199301240304.AA02067@EARACHE.TC.CORNELL.EDU>
  12.  
  13. The enclosed patch cures a core dump in x_io_error_handler, in emacs
  14. 18.59 under SunOS 4.1.3.  The core dump occurs with the command line
  15. "emacs <&-" (assuming a suitable choice of shell, i.e. bash or sh).
  16. This core dump occurs only when emacs is running as an X client.
  17.  
  18.  
  19. *** x11term.c~    Sat Oct 24 00:31:56 1992
  20. --- x11term.c    Sat Jan 23 21:52:27 1993
  21. ***************
  22. *** 2100,2121 ****
  23. --- 2100,2123 ----
  24.   x_init_1 ()
  25.   {
  26.   #ifdef F_SETOWN
  27.       extern int old_fcntl_owner;
  28.   #endif
  29.   
  30. +     if (ConnectionNumber(XXdisplay) != 0) {
  31.       dup2 (ConnectionNumber(XXdisplay), 0);
  32.   #ifndef SYSV_STREAMS
  33.       /* Streams somehow keeps track of which descriptor number
  34.          is being used to talk to X.  So it is not safe to substitute
  35.          descriptor 0.  But it is safe to make descriptor 0 a copy of it.  */
  36.       close (ConnectionNumber(XXdisplay));
  37.       ConnectionNumber(XXdisplay) = 0;    /* Looks a little strange?
  38.                            * check the def of the macro;
  39.                            * it is a genuine lvalue */
  40.   #endif
  41. +       }
  42.   
  43.   #ifdef USG
  44.       setpgrp ();        /* No arguments but equivalent in this case */
  45.   #else
  46.       setpgrp (0, getpid ());
  47.   #endif /* USG */
  48.  
  49.