From: Bryan Kramer

Subject: excl:run-shell-command - error output - Solaris - allegro 4.3

Date: 1997-10-3 14:19

My problem is finding a way to reliably read error output after a

		 (excl::run-shell-command command
				  :input :stream
				  :error-output :stream
				  :wait nil))


When the subprocess dies or exits
I find that a listen on the error output stream returns nil and
a read-line blocks forever after 1 line of error output is read.

If command is invalid, and fails immediately, I get nothing on the error
stream.

I was able to get all of the output by calling (sleep 1) before checking
the stream, but in my application, waiting a second for this is often
more time than it takes to process a unit of work. I guess that some other
function that forces a unix context switch probably would do the trick.

Note that common lisp doesn't supply any interesting predicates to look
at the streams connected to the subprocess. There seems to be no way
of checking that the process attached is dead, that stuff written to the
input is disappearing into the bit bucket, etc.

It would also be nice to be able to get the return code of the subprocess!



# Bryan M. Kramer
# Techne Knowledge Systems Inc.
# 439 University Ave., Suite 900
# Toronto, ON M5G 1Y8
# 416-977-3960 x 301 fax 416-977-9902