Skip to:
I have posted a patch to a number of issues discussed on the mailing list:
read stdout and stderr simultanously from separate threads to prevent stderr filling the buffer and hanging the process
removed stray println
use clojure.java.io to copy streams, avoiding byte-at-a-time copying
added :inenc option, specifying the input character set
renamed :out input option to :outenc
changed default encoding to 'platform default encoding'
write to stdin from a separate thread to prevent stdout blocking before we write anything
Additionally I have added support for a feature mentioned in the post, but not implemented in the original patch set:
added support for passing a byte array to :in
Original post:http://groups.google.com/group/clojure-dev/browse_thread/thread/b4a4d6eca3fd9b9d/b12cc9e47f03f617#b12cc9e47f03f617
Followup discussion:http://groups.google.com/group/clojure-dev/browse_thread/thread/dde2b5311212c072/3b24749935cfa4aa#3b24749935cfa4aa
Comment made by: importer
stu said: [[file:bWzYhgIDar36rceJe5cbLA]]
stu said: second patch subsumes first, fixes errors, reflection warnings, and tests
stu said: [[file:a5qDGmHtOr34HNeJe5cbLA]]
djpowell said: [[file:acCMkwHiCr34P8eJe5cbLr]]: Numerous fixes for clojure.java.shell
Converted from http://www.assembla.com/spaces/clojure/tickets/392Attachments:0001-read-stdout-and-stderr-simultanously-from-separate-t.patch - https://www.assembla.com/spaces/clojure/documents/acCMkwHiCr34P8eJe5cbLr/download/acCMkwHiCr34P8eJe5cbLr0392-shell-api-changes-and-fixes.patch - https://www.assembla.com/spaces/clojure/documents/a5qDGmHtOr34HNeJe5cbLA/download/a5qDGmHtOr34HNeJe5cbLA0392-shell-api-changes-and-fixes-2.patch - https://www.assembla.com/spaces/clojure/documents/bWzYhgIDar36rceJe5cbLA/download/bWzYhgIDar36rceJe5cbLA
I have posted a patch to a number of issues discussed on the mailing list:
read stdout and stderr simultanously from separate threads to prevent stderr filling the buffer and hanging the process
removed stray println
use clojure.java.io to copy streams, avoiding byte-at-a-time copying
added :inenc option, specifying the input character set
renamed :out input option to :outenc
changed default encoding to 'platform default encoding'
write to stdin from a separate thread to prevent stdout blocking before we write anything
Additionally I have added support for a feature mentioned in the post, but not implemented in the original patch set:
added support for passing a byte array to :in
Original post:
http://groups.google.com/group/clojure-dev/browse_thread/thread/b4a4d6eca3fd9b9d/b12cc9e47f03f617#b12cc9e47f03f617
Followup discussion:
http://groups.google.com/group/clojure-dev/browse_thread/thread/dde2b5311212c072/3b24749935cfa4aa#3b24749935cfa4aa