[comp.emacs] Interactive subprocesses in GNU under VMS

mike@yetti.UUCP (Mike Clarkson ) (07/09/87)

I have a question about interactive subprocesses under VMS.
If I try to use send-command-to-subprocess to send a command
to an existing VMS subprocess from an elisp program, nothing is sent until the
top-level command that encloses the send-command-to-subprocess
terminates.  For example, consider calling (foo) where

(defun foo ()
  (send-command-to-subprocess 1 "show day\r")
  (sit-for 5)
;; show day is the VMS command to print the date and time

Nothing is sent to the subprocess until after the sit-for 5 seconds has
elapsed.  Furthermore,

(defun foo ()
  (send-command-to-subprocess 1 "show day\r")
  (sit-for 5)
  (send-command-to-subprocess 1 "show day\r"))

does not send either of the commands until the termination of foo,
and the results in the COMMAND buffer show that the two SHOW DAY
commands were received at the same time (or within a second of each other).

It makes no difference whether I am in the *COMMAND* buffer,
or if (sit-for 5) is any other time consuming operation -
nothing happens with the subprocess until the top-level function
terminates.

Similarly (defun bar () (foo)) will not execute the commands until bar
has terminated.

Can someone please explain to me what is going on, and how to flush the command
input so that a send-command-to-subprocess is executed when I want it to.
This is true under VMS GNU 17.46 or 18.44, using either mailboxes or PTY's.
Yet the subprocesses are asynchronous to some extent as once you have
started a command in the COMMAND buffer, (say a long compile or TeX job),
you are free to go on and do other things whilst that command executes.


-- 
Mike Clarkson,		  ...!allegra \			BITNET:	mike@YUYETTI or
CRESS, York University,	  ...!decvax   \			SYMALG@YUSOL
4700 Keele Street,	  ...!ihnp4     > !utzoo!yetti!mike
North York, Ontario,	  ...!linus    /		     
CANADA M3J 1P3.		  ...!watmath /		Phone: +1 (416) 736-2100 x 7767


"...the most inevitable business communications system on the planet."
						- ROLM magazine advertisement
 which planet?