Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dealing with runtime.exec() I/) streams

 
John Davis
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am invoking a communications utility via runtime.exec().



As you can see, I spawn threads to exhaust and print the error and output streams.

If I deliberately screw up the dns name in the pscp command, I do get an error printed out in the streamGobbler thread for PSCP Errors.

But when the pscp command is specified correctly, the process never terminates supposedly because my program is not obtaining and responding to the request for a password.

But this request never shows up in the PSCP output stream?

Any ideas on how I can obtain and respond to the request for a password when invoking pscp in this way?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

As you can see, ...

No - that's too bad formatted.
You may edit the post - then perhaps I will spend my time reading it.
If you don't spend your time in writing, why should I in reading?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic