On Fri, 18 May 2001, Ellen Spertus wrote:
> Sometimes, when I create a process with Runtime.exec, waitFor never
> returns, even though I'm clearing the error and output streams. Here is
> my code, with important lines starred:
>
[snip]
> String[] commandArray = {"/bin/sh", "-c", command};
>
> My log file reads:
> About to call exec
> /bin/sh -c lynx -dump -force_html
> /home/systers/javamlm/archive/94.text-html >
> /home/systers/javamlm/archive/94.text-plain
> Done with ErrorStream
> Done with InputStream
> About to call waitFor
When I invoke lynx the say way the code does, lynx goes into full-screen
mode. It isn't writing to stdout via the shell's redirect, it' using
ncurses to manipulate my screen.
When I invoke lynx without the shell, it writes to stdout as expected.
Lynx isn't a shell script, you can invoke it directly in the exec() call.
--
Joi Ellis Software Engineer
Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED]
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]