"Jim - FooBar();" <[email protected]> writes: >> In preference to using Runtime/exec, you can use >> clojure.java.shell/sh and write your password to the stdin of the >> process using its :in argument. > > Now that sounds more sensible but it means that the consumer has to > have clojure...what if i was to aot-compile the function with > gen-class to pretend it is plain Java?
The consumer would not need clojure, he is not suggesting you use some clojure shell command, but rather the clojure.java.shell/sh function which lets you write to stdin (and read stdout) from a shell process you call from your Java program. Also, you will need to invoke sudo with the -S argument so it reads from stdin, and not from a pty. -- Craig Brozefsky <[email protected]> Premature reification is the root of all evil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
