🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #98513

18.57 emacs sub-processes are hosed n ways.

#98513
From: Wolfgang S. Rupprecht
Date: Thu, 04 Jul 1991 08:57
61 lines
2461 bytes
In GNU Emacs 18.57.3 of Thu Apr 11 1991 on wsrcc.com (berkeley-unix)
Sparc 4/20 - Sunos 4.1

Here is more information on the subprocess problems I am seeing.

The bug driver: 

    (defun proc-bug (flag)
      "This is the process bug. Non nil FLAG says to use a pty, else use a pipe."
      (interactive "P")
      (let* ((process-connection-type flag)
	    (xgraph (start-process "echoargs" nil
				   "echoargs" "=+0+0" "-y" "Miles Per Gallon"
				   "-x" "Miles" "-t" "Mileage Graph"
				   "-m"))
	    (cnt 0))
	(send-string xgraph "\"Instant \"Average \"Filtered\n")
	(while (< cnt 100)
	  (process-send-string xgraph
			       (format "This is the %s line of output\n" cnt))
	  (setq cnt (1+ cnt)))
	(process-send-eof xgraph)))

Put this shell script in your path - mode 755.

------------
    #!/bin/sh
    File: echoargs 
    Mode: 755

    (date ; tty ; echo "$0: $*" ; cat - ; echo ".******* EOF *******." ; date) > /tmp/echoargs.$$
--------------
now run these forms:

    (proc-bug t)

The first form gets the "writing to process error" inside emacs.
Perhaps this will let someone more familiar with the emacs process
code chase down this bug.

    (proc-bug nil)

The second form demonstrates a different problem.  

    Thu Jul  4 12:44:59 EDT 1991
    not a tty
    /u/wolfgang/bin/echoargs: =+0+0 -y Miles Per Gallon -x Miles -t Mileage Graph -m
    "Instant "Average "Filtered
    This is the 0 line of output
    [...]
    This is the 99 line of output
    

An EOF is never sent to a pipe.  A '^D' is sent down it instead.  (I
believe the correct way to send an EOF down a pipe is to close the
writing side of the pipe.)

-wolfgang
---
Wolfgang Rupprecht    wolfgang@wsrcc.com (or) uunet!wsrcc!wolfgang
Snail Mail Address:   Box 6524, Alexandria, VA 22306-0524
Technical Details
Message-ID: <9107041657.AA02741@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,15be2d21a83994de,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1991-07-04 01:57:25 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.
Message-ID: <9107041657.AA02741@wsrcc.com>
Date: 4 Jul 91 08:57:25 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: Wolfgang S Rupprecht Computer Consulting, Washington DC.
Lines: 61
Approved: bug-gnu-emacs@prep.ai.mit.edu