On Mon, Jan 9, 2012 at 11:20 PM, jaime <xiejianm...@gmail.com> wrote:
>
> now it works fine for NON-interactive command such as "dir" or "help",
> but it will hang when I send the shell commands that require user
> input, such as "time". I think the reason is that my code doesn't
> detect any input requirement so the shell keep waiting for an input
> infinitely.
>

You could get around the blocking I/O problem with
java.nio.channels.Selector and the like.  Wrapping or duplicating what
expect4j does would do the trick.

http://code.google.com/p/expect4j/

- Ryan

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to