🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98516

18.57 emacs sub-processes are hosed n ways. (more)

#98516
From: Wolfgang S. Rupprecht
Date: Thu, 04 Jul 1991 15:17
68 lines
2543 bytes
Hacking a process.c bit more I also got emacs to stop thinking that 
sending a ^D down a pipe was the same as generating an EOF condition.

diff started at Thu Jul  4 19:10:28
cd /usr/local/emacs/src/
diff -c process.c.~1~ process.c
*** process.c.~1~	Tue Jan 15 20:28:48 1991
--- process.c	Thu Jul  4 15:18:57 1991
***************
*** 1908,1914 ****
  	if (rv < 0)
  	  {
  #ifdef EWOULDBLOCK
! 	    if (errno == EWOULDBLOCK)
  	      {
  		/* It would be nice to accept process output here,
  		   but that is difficult.  For example, it could
--- 1908,1914 ----
  	if (rv < 0)
  	  {
  #ifdef EWOULDBLOCK
! 	    if ((errno == EWOULDBLOCK) || errno == EAGAIN)
  	      {
  		/* It would be nice to accept process output here,
  		   but that is difficult.  For example, it could
***************
*** 2137,2143 ****
      write (XFASTINT (XPROCESS (proc)->outfd), buf, 0);
    }
  #else /* did not do TOICREMOTE */
!   send_process (proc, "\004", 1);
  #endif /* did not do TOICREMOTE */
    return process;
  }
--- 2137,2162 ----
      write (XFASTINT (XPROCESS (proc)->outfd), buf, 0);
    }
  #else /* did not do TOICREMOTE */
!   /*
!    * wrong. ^D is not EOF. -wsr
!    * send_process (proc, "\004", 1);
!    */
!    {
!        struct Lisp_Process *p = XPROCESS (proc);
!        int outchannel = XFASTINT (p->outfd);
! 
!
!        if (outchannel && (outchannel == XFASTINT (p->infd)))
!        {
! 	   send_process (proc, "\004", 1); /* AAAAARRRRRGGGG! */
!        } else
!
!        if (outchannel)
!        {
! 	   close(outchannel);
! 	   XFASTINT (p->outfd) = 0;
!        }
!    }
  #endif /* did not do TOICREMOTE */
    return process;
  }

diff exited abnormally with code 1 at Thu Jul  4 19:10:29

-wolfgang
---
Wolfgang Rupprecht    wolfgang@wsrcc.com (or) uunet!wsrcc!wolfgang
Snail Mail Address:   Box 6524, Alexandria, VA 22306-0524
Technical Details
Message-ID: <9107042317.AA05493@wsrcc.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!wsrcc.COM!wolfgang

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,916a2a3f48e8475b,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-07-04 08:17:05 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!wsrcc.COM!wolfgang
From: wolfgang@wsrcc.COM (Wolfgang S. Rupprecht)
Newsgroups: gnu.emacs.bug
Subject: 18.57 emacs sub-processes are hosed n ways. (more)
Message-ID: <9107042317.AA05493@wsrcc.com>
Date: 4 Jul 91 15:17:05 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: Wolfgang S Rupprecht Computer Consulting, Washington DC.
Lines: 68
Approved: bug-gnu-emacs@prep.ai.mit.edu