Thanks a lot. It's really reassuring. I'll try this tomorrow on linux
machine, hopefully.
THANKS A LOT AGAIN
-Mak
At 10:45 5/07/99 +0200, Cengiz Tuztas wrote:
>Yes, I use the following and it works under Linux Kernel 2.2.10 SuSE
>Dist 6.1.
>
> private int exec( String _command , String logname, boolean lock)
> {
> Runtime rt = Runtime.getRuntime();
> Process proc = null;
> int exitValue = 0;
>
> try {
> String line;
> proc = rt.exec( _command );
>
> BufferedReader brstdout = new
> BufferedReader( new InputStreamReader(
> proc.getInputStream() ) );
> BufferedReader brstderr = new
> BufferedReader( new InputStreamReader(
> proc.getErrorStream() ) );
>
> while ( ( line = brstderr.readLine() ) != null ) log(
> logname, line
>);
> while ( ( line = brstdout.readLine() ) != null ) log(
> logname, line
>);
>
> if ( lock )
> exitValue = proc.waitFor();
> }
> catch ( IOException ioe )
> {
> log( logname, ioe.getMessage() );
> }
> catch ( InterruptedException ie )
> {
> log( logname, ie.getMessage() );
> }
> return exitValue;
>
>
>--
>---
>Cengiz Tuztas
>Dipl. - Wirt. Inform.
>
>ADA - Das SystemHaus GmbH
>Berliner Platz 12 - 41061 Mönchengladbach
>Tel.: 0 21 61 / 655 - 7247, Fax: -7216
>---
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]