waitFor after exec never returns

2001-05-18 Thread Ellen Spertus
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:     static void shexec(String command) throws InternalErrorException { String[] commandArray = {"/bin/sh", "-c

Re: waitFor after exec never returns

2001-05-18 Thread Ellen Spertus
Thanks for the reply. >Lynx isn't a shell script, you can invoke it directly in the exec() call. The reason I don't invoke lynx directly is because I am redirecting its output to a file, which of course requires a shell. I think that was obscured by some bad line breaks in my original message

Re: waitFor after exec never returns

2001-05-18 Thread Ellen Spertus
e.exec, because it includes redirection. Do you know how to get lynx to do what I want (convert a html file into text)? Ellen Spertus -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Re: waitFor after exec never returns

2001-05-18 Thread Ellen Spertus
At 09:57 PM 5/18/2001 -0500, Joi Ellis wrote: >Lynx is writing the rendered text to stdout, which you're reading and >throwing away. Why not read it and write it to the file yourself? I thought doing it with redirection would be simpler, but apparently not. I rewrote it so my program grabs the