#3 Allow access to exit return code

open
nobody
None
5
2003-11-07
2003-11-07
Anonymous
No

It would be useful sometimes to have access to the exec
() return code.

Here is my amended version of the exec() code:

int // NEW
exec( String arg )
{
this.proc = Runtime.getRuntime().exec(arg);
this.din = new DataInputStream(
proc.getInputStream() );
while( (line=din.readLine()) != null )
print(line);
return this.proc.exitValue(); // NEW
}

Discussion