From: <cr...@us...> - 2009-04-27 15:05:42
|
Revision: 5353 http://jnode.svn.sourceforge.net/jnode/?rev=5353&view=rev Author: crawley Date: 2009-04-27 15:05:37 +0000 (Mon, 27 Apr 2009) Log Message: ----------- Change proclet and isolate invokers to respect the 'internal' flag. (I've brought this change forward because we need to debug the isolate vs pipelines issue) Modified Paths: -------------- trunk/shell/src/shell/org/jnode/shell/CommandRunner.java trunk/shell/src/shell/org/jnode/shell/isolate/IsolateCommandInvoker.java trunk/shell/src/shell/org/jnode/shell/proclet/ProcletCommandInvoker.java Modified: trunk/shell/src/shell/org/jnode/shell/CommandRunner.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/CommandRunner.java 2009-04-27 14:14:23 UTC (rev 5352) +++ trunk/shell/src/shell/org/jnode/shell/CommandRunner.java 2009-04-27 15:05:37 UTC (rev 5353) @@ -195,6 +195,10 @@ return env; } + public CommandInfo getCommandInfo() { + return cmdInfo; + } + public void flushStreams() { for (CommandIO io : ios) { if (io instanceof CommandOutput) { Modified: trunk/shell/src/shell/org/jnode/shell/isolate/IsolateCommandInvoker.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/isolate/IsolateCommandInvoker.java 2009-04-27 14:14:23 UTC (rev 5352) +++ trunk/shell/src/shell/org/jnode/shell/isolate/IsolateCommandInvoker.java 2009-04-27 15:05:37 UTC (rev 5353) @@ -26,6 +26,7 @@ import org.jnode.shell.CommandRunner; import org.jnode.shell.CommandShell; import org.jnode.shell.CommandThread; +import org.jnode.shell.CommandThreadImpl; import org.jnode.shell.ShellInvocationException; import org.jnode.shell.SimpleCommandInvoker; @@ -58,10 +59,14 @@ @Override protected CommandThread createThread(CommandRunner cr) throws ShellInvocationException { - try { - return new IsolateCommandThreadImpl(cr); - } catch (IOException ex) { - throw new ShellInvocationException(ex); + if (cr.getCommandInfo().isInternal()) { + return new CommandThreadImpl(cr, cr.getCommandName()); + } else { + try { + return new IsolateCommandThreadImpl(cr); + } catch (IOException ex) { + throw new ShellInvocationException(ex); + } } } } Modified: trunk/shell/src/shell/org/jnode/shell/proclet/ProcletCommandInvoker.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/proclet/ProcletCommandInvoker.java 2009-04-27 14:14:23 UTC (rev 5352) +++ trunk/shell/src/shell/org/jnode/shell/proclet/ProcletCommandInvoker.java 2009-04-27 15:05:37 UTC (rev 5353) @@ -83,12 +83,16 @@ protected CommandThreadImpl createThread(CommandRunner cr) { CommandIO[] ios = cr.getIOs(); - return Proclet.createProclet(cr, cr.getSysProps(), cr.getEnv(), - new Object[] { - ios[Command.STD_IN].getInputStream(), - ios[Command.STD_OUT].getPrintStream(), - ios[Command.STD_ERR].getPrintStream()}, + if (cr.getCommandInfo().isInternal()) { + return new CommandThreadImpl(cr, cr.getCommandName()); + } else { + return Proclet.createProclet(cr, cr.getSysProps(), cr.getEnv(), + new Object[] { + ios[Command.STD_IN].getInputStream(), + ios[Command.STD_OUT].getPrintStream(), + ios[Command.STD_ERR].getPrintStream()}, cr.getCommandName()); + } } private static synchronized void init() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |