head 1.2; access; symbols; locks; strict; comment @# @; 1.2 date 2001.05.11.18.48.12; author linus; state Exp; branches; next 1.1; 1.1 date 2001.05.02.23.52.06; author linus; state Exp; branches; next ; desc @works!! @ 1.2 log @rm msglog @ text @import java.io.*; public class shell { public int shell( String cmdline ) { try { String line; // System.out.println( "Exec: " + cmdline ); Process p = Runtime.getRuntime().exec( cmdline ); /* BufferedReader input = new BufferedReader( new InputStreamReader( p.getInputStream() )); while (( line = input.readLine()) != null ) { System.out.println( line ); } input.close(); */ p.waitFor(); return( p.exitValue() ); } catch( Exception e ) { System.out.println( "SHELL " + cmdline + ": " + e ); } return( 1 ); } /* public static void main( String args[] ) { new shell( args[0] ); } */ } @ 1.1 log @Initial revision @ text @a1 1 import msglog; d23 1 a23 2 msglog mlog = new msglog(); mlog.write( "SHELL " + cmdline + ": " + e ); @