Numerous fixes for clojure.java.shell

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

Environment

None

Activity

Show:

import August 24, 2010 at 4:59 PM

Comment made by: importer

stu said: [[file:bWzYhgIDar36rceJe5cbLA]]

import August 24, 2010 at 4:59 PM

Comment made by: importer

stu said: second patch subsumes first, fixes errors, reflection warnings, and tests

import August 24, 2010 at 4:59 PM

Comment made by: importer

stu said: [[file:a5qDGmHtOr34HNeJe5cbLA]]

import August 24, 2010 at 4:59 PM

Comment made by: importer

djpowell said: [[file:acCMkwHiCr34P8eJe5cbLr]]: Numerous fixes for clojure.java.shell

Completed

Details

Assignee

Reporter

Approval

Ok

Fix versions

Created June 30, 2010 at 9:34 PM
Updated August 24, 2010 at 4:59 PM
Resolved August 24, 2010 at 4:59 PM