Run Process in TTY session
796125Jul 23 2009 — edited Aug 6 2009I'm working on a linux machine, and have a process that I want to launch from within a java program (please, no sermons about platform dependence and choosing java as a technology. I have my reasons).
This process typically writes a few questions out to stdout and asks for responses on stdin. My java program has already gathered all of the information necessary to answer these questions, and done so in what I believe is a more professional and efficient manner. I would like to be able to simply answer these questions by attaching readers and writers to the input and output streams of the process (think expect script, but written in Java).
The problem is that the process I'm launching seems to know that it has attached to a process that is not part of a tty session, so instead of posing it's questions on stdout and looking for input on stdin, it puts up dialog boxes.
Does anybody know how to start a process and associate it with a tty session, or fool it into thinking it's running with a tty session, so that it will accept input on stdin?
- Adam