Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.2
-
Component/s: None
-
Labels:None
-
Approval:Ok
Description
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
Converted from http://www.assembla.com/spaces/clojure/tickets/392
Attachments:
0001-read-stdout-and-stderr-simultanously-from-separate-t.patch - https://www.assembla.com/spaces/clojure/documents/acCMkwHiCr34P8eJe5cbLr/download/acCMkwHiCr34P8eJe5cbLr
0392-shell-api-changes-and-fixes.patch - https://www.assembla.com/spaces/clojure/documents/a5qDGmHtOr34HNeJe5cbLA/download/a5qDGmHtOr34HNeJe5cbLA
0392-shell-api-changes-and-fixes-2.patch - https://www.assembla.com/spaces/clojure/documents/bWzYhgIDar36rceJe5cbLA/download/bWzYhgIDar36rceJe5cbLA