This is the mail archive of the frysk-cvs@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] master: Fix comparison typo.


The branch, master has been updated
       via  cf7ad51045d0b226e2bbc4d737af7b265a787157 (commit)
       via  0e81fec575ff4b3012b695629e885a6a594a1381 (commit)
       via  f97ca599b287a864a0f6b00a9c18e3b3da7e9e0d (commit)
      from  79400a6b6d06ba2a36277ffd27326aac38cff336 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit cf7ad51045d0b226e2bbc4d737af7b265a787157
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Mar 4 21:38:03 2008 -0500

    Fix comparison typo.
    
    frysk-sys/frysk/config/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* TestBuildCompiler.java: Fix comparisons.

commit 0e81fec575ff4b3012b695629e885a6a594a1381
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Mar 4 21:19:52 2008 -0500

    Make use of Host.requestCreateAttachedProc(<existing-proc); simplify.
    
    frysk-core/frysk/bindir/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* TestFexe.java testExePath()): New.
    
    frysk-core/frysk/hpd/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* LoadCommand.java (interpret()): Simplify; add -exe option.
    	* RunCommand.java: Update.
    	* StartCommand.java: Update.
    	* StartRun.java: Make abstract.
    	(interpret(CLI,Input,Object)): Delete.
    	(interpretRun(CLI,Input,Object)): Delete.
    	(interpretStart(CLI,Input,Object)): Delete.
    	(interpretCmd(CLI,Input,Object,boolean)): Add runToBreak parameter.
    	(runToBreak): Pass as parameter.
    	(run(CLI,cmd,boolean)): Replace run(CLI,String,boolean).
    	(parseParameters(String[],boolean)): Delete.
    	(getParameters(Input,Task)): Delete.

commit f97ca599b287a864a0f6b00a9c18e3b3da7e9e0d
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Mar 4 19:19:39 2008 -0500

    Add explict executable paramter to fork/exec et.al.
    
    frysk-core/frysk/hpd/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* ShellCommand.java: Use simplier requestCreateAttachedProc.
    
    frysk-core/frysk/proc/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* Host.java (requestCreateAttachedProc(...)): Add File exe arg.
    	(requestCreateAttachedProc(Proc,TaskObserver.Attached)): New.
    	* TestRun.java: Update.
    
    frysk-core/frysk/proc/dead/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* DeadHost.java: Update to match Host.
    	* LinuxExeFactory.java: Search $PATH for the executable.
    
    frysk-core/frysk/proc/dummy/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* DummyHost.java: Update to match File.
    
    frysk-core/frysk/proc/live/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* LinuxPtraceHost.java: Update to match Host.
    
    frysk-sys/frysk/sys/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* Fork.java (spawn(File,String,String,String,String[],int)): New.
    	(ptrace(File,String,String,String,String[])): New.
    	(exec(File,String,String,String,String[])): New.
    	(utrace(File,String,String,String,String[])): New.
    	(daemon(File,String,String,String,String[])): New.
    	* cni/Fork.cxx (Fork::spawn): Update.
    
    frysk-sys/frysk/sys/ptrace/ChangeLog
    2008-03-04  Andrew Cagney  <cagney@redhat.com>
    
    	* TestPtrace.java: Update to match Fork.
    	* TestUtrace.java: Ditto.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/bindir/ChangeLog               |    2 +
 frysk-core/frysk/bindir/TestFexe.java           |    8 ++
 frysk-core/frysk/hpd/ChangeLog                  |   15 +++
 frysk-core/frysk/hpd/LoadCommand.java           |   53 +++++-----
 frysk-core/frysk/hpd/RunCommand.java            |   10 ++-
 frysk-core/frysk/hpd/ShellCommand.java          |    5 +-
 frysk-core/frysk/hpd/StartCommand.java          |   12 ++-
 frysk-core/frysk/hpd/StartRun.java              |  126 ++++++-----------------
 frysk-core/frysk/hpd/TestLoadCommand.java       |   18 +++-
 frysk-core/frysk/proc/ChangeLog                 |    6 +
 frysk-core/frysk/proc/Host.java                 |   39 ++++++-
 frysk-core/frysk/proc/TestRun.java              |    4 +-
 frysk-core/frysk/proc/dead/ChangeLog            |    5 +
 frysk-core/frysk/proc/dead/DeadHost.java        |    4 +-
 frysk-core/frysk/proc/dead/LinuxExeFactory.java |   35 ++++++-
 frysk-core/frysk/proc/dummy/ChangeLog           |    4 +
 frysk-core/frysk/proc/dummy/DummyHost.java      |    4 +-
 frysk-core/frysk/proc/live/ChangeLog            |    4 +
 frysk-core/frysk/proc/live/LinuxPtraceHost.java |    6 +-
 frysk-sys/frysk/config/ChangeLog                |    4 +
 frysk-sys/frysk/config/TestBuildCompiler.java   |    8 +-
 frysk-sys/frysk/sys/ChangeLog                   |    9 ++
 frysk-sys/frysk/sys/Fork.java                   |   92 ++++++++++++----
 frysk-sys/frysk/sys/TestFork.java               |    6 +-
 frysk-sys/frysk/sys/cni/Fork.cxx                |   48 ++++-----
 frysk-sys/frysk/sys/ptrace/ChangeLog            |    5 +
 frysk-sys/frysk/sys/ptrace/TestPtrace.java      |    3 +-
 frysk-sys/frysk/sys/ptrace/TestUtrace.java      |    3 +-
 28 files changed, 334 insertions(+), 204 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog
index 717fabf..8cc896a 100644
--- a/frysk-core/frysk/bindir/ChangeLog
+++ b/frysk-core/frysk/bindir/ChangeLog
@@ -1,5 +1,7 @@
 2008-03-04  Andrew Cagney  <cagney@redhat.com>
 
+	* TestFexe.java testExePath()): New.
+	
 	* TestFexe.java (testExeOfExe()): New.
 
 2008-03-03  Andrew Cagney  <cagney@redhat.com>
diff --git a/frysk-core/frysk/bindir/TestFexe.java b/frysk-core/frysk/bindir/TestFexe.java
index 38ef99a..bad06fd 100644
--- a/frysk-core/frysk/bindir/TestFexe.java
+++ b/frysk-core/frysk/bindir/TestFexe.java
@@ -68,4 +68,12 @@ public class TestFexe extends TestLib {
 	    });
 	e.expect("/bin/ls" + "\r\n");
     }
+
+    public void testExePath() {
+	TearDownExpect e = new TearDownExpect(new String[] {
+		"/bin/bash", "-c",
+		"PATH=/bin " + Config.getBinFile("fexe").getPath() + " ls"
+	    });
+	e.expect("/bin/ls" + "\r\n");
+    }
 }
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 8df43bb..650bcd4 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,5 +1,20 @@
 2008-03-04  Andrew Cagney  <cagney@redhat.com>
 
+	* LoadCommand.java (interpret()): Simplify; add -exe option.
+	* RunCommand.java: Update.
+	* StartCommand.java: Update.
+	* StartRun.java: Make abstract.
+	(interpret(CLI,Input,Object)): Delete.
+	(interpretRun(CLI,Input,Object)): Delete.
+	(interpretStart(CLI,Input,Object)): Delete.
+	(interpretCmd(CLI,Input,Object,boolean)): Add runToBreak parameter.
+	(runToBreak): Pass as parameter.
+	(run(CLI,cmd,boolean)): Replace run(CLI,String,boolean).
+	(parseParameters(String[],boolean)): Delete.
+	(getParameters(Input,Task)): Delete.
+
+	* ShellCommand.java: Use simplier requestCreateAttachedProc.
+
 	* HpdTestbed.java (start(String)): Delete.
 	(load(String)): New.
 
diff --git a/frysk-core/frysk/hpd/LoadCommand.java b/frysk-core/frysk/hpd/LoadCommand.java
index d402a23..f848295 100644
--- a/frysk-core/frysk/hpd/LoadCommand.java
+++ b/frysk-core/frysk/hpd/LoadCommand.java
@@ -69,17 +69,22 @@ public class LoadCommand extends ParameterizedCommand {
 	      + " is displayed.\nNo arguments to be passed to the proc are"
 	      + " entered here.  Those arguments are passed to the proc(s)"
 	      + " via the 'start' or 'run' commands.");
-	
         add(new CommandOption("sysroot", "pathname to use as a sysroot",
-        "Pathname") {
-            void parse(String args, Object options) {
-        	((Options)options).sysroot = args;
-            }
-        });
+			      "Pathname") {
+		void parse(String args, Object options) {
+		    ((Options)options).sysroot = args;
+		}
+	    });
+        add(new CommandOption("exe", "Path to executable", "executable") {
+		void parse(String args, Object options) {
+		    ((Options)options).executable = args;
+		}
+	    });
     }
 
     private static class Options {
 	String sysroot = "/";
+	String executable = null;
     }
     Object options() {
 	return new Options();
@@ -88,28 +93,26 @@ public class LoadCommand extends ParameterizedCommand {
     public void interpret(CLI cli, Input cmd, Object options) {
 	
 	Options o = (Options)options;
-	if (cmd.size() > 2) {
-	    throw new InvalidCommandException("Too many parameters");
-	} else if (cmd.size() < 1 && !cli.loadedProcs.isEmpty()) {
-	    // List the loaded procs if no parameters entered
-	    ViewsetCommand.printLoop(cli.targetset, cli, "Target set", true);
-	    return;
-	} else if (cmd.size() < 1 && cli.loadedProcs.isEmpty()) {
-	    cli.addMessage("No loaded procs currently", Message.TYPE_NORMAL);
-	    return;
+	if (cmd.size() < 1) {
+	    if (cli.loadedProcs.isEmpty()) {
+		cli.addMessage("No loaded procs currently",
+			       Message.TYPE_NORMAL);
+		return;
+	    } else {
+		// List the loaded procs if no parameters entered
+		ViewsetCommand.printLoop(cli.targetset, cli, "Target set",
+					 true);
+		return;
+	    }
 	}
-
-	File executableFile = new File(cmd.parameter(0));
-
-	if (!executableFile.exists() || !executableFile.canRead()
-		|| !executableFile.isFile()) {
-	    throw new InvalidCommandException
-	    	("File does not exist or is not readable or is not a file.");
+	Proc exeProc;
+	if (o.executable != null) {
+	    exeProc = LinuxExeFactory.createProc
+		(new File(o.executable), cmd.stringArrayValue());
+	} else {
+	    exeProc = LinuxExeFactory.createProc(cmd.stringArrayValue());
 	}
 
-	Proc exeProc = LinuxExeFactory.createProc(executableFile,
-						  cmd.stringArrayValue());
-
 	load(exeProc, cli, o.sysroot);
     }
 
diff --git a/frysk-core/frysk/hpd/RunCommand.java b/frysk-core/frysk/hpd/RunCommand.java
index 30c6082..eeef1ac 100644
--- a/frysk-core/frysk/hpd/RunCommand.java
+++ b/frysk-core/frysk/hpd/RunCommand.java
@@ -58,7 +58,15 @@ class RunCommand extends StartRun {
 	      + " to be reloaded and run until breakpoint or termination.");
     }
 
+    /**
+     * interpretRun is called from RunCommand to run a process until
+     * its first break point(if any) or until it blows up of finishes.
+     * 
+     * @param cli is the current command line interface object
+     * @param cmd is the command to be run
+     * @param options is not used at this point
+     */
     public void interpret(CLI cli, Input cmd, Object options) {
-	interpretRun(cli, cmd, options);
+	interpretCmd(cli, cmd, options, true);
     }
 }
diff --git a/frysk-core/frysk/hpd/ShellCommand.java b/frysk-core/frysk/hpd/ShellCommand.java
index 14345e3..11c4b33 100644
--- a/frysk-core/frysk/hpd/ShellCommand.java
+++ b/frysk-core/frysk/hpd/ShellCommand.java
@@ -80,9 +80,8 @@ class ShellCommand extends NoOptsCommand {
 	PtyTerminal.setToInitConsole(FileDescriptor.in);
 
 	// Request an attached proc to execute command.
-  	Manager.host.requestCreateAttachedProc(null, null, null, command,
-  		new TaskObserver.Attached()
-  	{  	    
+  	Manager.host.requestCreateAttachedProc(command,
+					       new TaskObserver.Attached() {  	    
   	    public Action updateAttached (Task task)
   	    {
   		// On termination of command, resume fhpd.
diff --git a/frysk-core/frysk/hpd/StartCommand.java b/frysk-core/frysk/hpd/StartCommand.java
index ecfe800..841dd29 100644
--- a/frysk-core/frysk/hpd/StartCommand.java
+++ b/frysk-core/frysk/hpd/StartCommand.java
@@ -57,7 +57,15 @@ class StartCommand extends StartRun {
 		      + " process and run to the first executable instruction.");
     }
     
-    public void interpret(CLI cli, Input cmd, Object options) {
-	interpretStart(cli, cmd, options);
+    /**
+     * interpretStart is called from StartCommand to start a process and
+     * run it to the first executable statement.
+     * 
+     * @param cli is the current command line interface object
+     * @param cmd is the command to be started
+     * @param options is not used at this point
+     */
+    public void interpret(CLI cli, Input cmd, Object options)  {
+	interpretCmd(cli, cmd, options, false);
     }
 }
\ No newline at end of file
diff --git a/frysk-core/frysk/hpd/StartRun.java b/frysk-core/frysk/hpd/StartRun.java
index fa58e6c..cf6044e 100644
--- a/frysk-core/frysk/hpd/StartRun.java
+++ b/frysk-core/frysk/hpd/StartRun.java
@@ -57,9 +57,7 @@ import java.util.Set;
  * Due to a lot of similar code in StartCommand/RunCommand this class was
  * created to consolidate most of the methods to one code base.
  */
-class StartRun extends ParameterizedCommand {
-    
-    boolean runToBreak = false;
+abstract class StartRun extends ParameterizedCommand {
     
     StartRun(String command, String help1, String help2) {
 	super(command, help1, help2);
@@ -124,39 +122,8 @@ class StartRun extends ParameterizedCommand {
 	}
     }
     
-    /**
-     * interpretRun is called from RunCommand to run a process until
-     * its first break point(if any) or until it blows up of finishes.
-     * 
-     * @param cli is the current command line interface object
-     * @param cmd is the command to be run
-     * @param options is not used at this point
-     */
-    public void interpretRun(CLI cli, Input cmd, Object options) {
-	runToBreak = true;
-	interpretCmd(cli, cmd, options);
-	return;
-    }
-   
-    /**
-     * interpretStart is called from StartCommand to start a process and
-     * run it to the first executable statement.
-     * 
-     * @param cli is the current command line interface object
-     * @param cmd is the command to be started
-     * @param options is not used at this point
-     */
-    public void interpretStart(CLI cli, Input cmd, Object options)  {
-	runToBreak = false;
-	interpretCmd(cli, cmd, options);
-	return;
-    }
-    
-    public void interpret(CLI cli, Input cmd, Object options) {
-	return;
-    }
-
-    public void interpretCmd(CLI cli, Input cmd, Object options) {
+    public void interpretCmd(CLI cli, Input cmd, Object options,
+			     boolean runToBreak) {
 	// See if there are any running tasks, if so, process them
 	// if there are not any procs loaded with the load/core commands
 	Iterator foo = cli.targetset.getTaskData();
@@ -177,10 +144,7 @@ class StartRun extends ParameterizedCommand {
 			synchronized (cli) {
 				cli.taskID = taskid;
 			}
-			String paramList = getParameters(cmd, task);
-		    	Input newcmd = new Input(task.getProc().getExe() + " " +
-			    paramList);
-		    	run(cli, newcmd);
+		    	run(cli, cmd, task.getProc(), runToBreak);
 		    	synchronized (cli) {
 				cli.taskID = -1;
 				cli.loadedProcs.clear();
@@ -203,7 +167,7 @@ class StartRun extends ParameterizedCommand {
 	/* This is the case where there are loaded procs */
 	if (!cli.loadedProcs.isEmpty()) {
 	    Set procSet = cli.loadedProcs.entrySet();
-	    runProcs(cli, procSet, cmd);
+	    runProcs(cli, procSet, cmd, runToBreak);
 	    synchronized (cli) {
 		cli.loadedProcs.clear();
 	    }
@@ -212,16 +176,29 @@ class StartRun extends ParameterizedCommand {
 	/* Check to see if there were procs loaded from a core command */
 	if (!cli.coreProcs.isEmpty()) {
 	    Set coreSet = cli.coreProcs.entrySet();
-	    runProcs(cli, coreSet, cmd);
+	    runProcs(cli, coreSet, cmd, runToBreak);
 	    synchronized (cli) {
 		cli.coreProcs.clear();
 	    }
 	}
     }
 
-    private void run(CLI cli, Input cmd) {
+    private void run(CLI cli, Input cmd, Proc template, boolean runToBreak) {
 	Runner runner = new Runner(cli);
-	Manager.host.requestCreateAttachedProc(cmd.stringArrayValue(), runner);
+	if (cmd.size() == 0) {
+	    cli.addMessage("starting/running with this command: " + 
+			   asString(template.getCmdLine()),
+			   Message.TYPE_NORMAL);
+	    Manager.host.requestCreateAttachedProc(template, runner);
+	} else {
+	    String[] args = new String[cmd.size() + 1];
+	    args[0] = template.getCmdLine()[0];
+	    for (int i = 1; i < args.length; i++)
+		args[i] = cmd.parameter(i - 1);
+	    cli.addMessage("starting/running with this command: " + 
+			   asString(args), Message.TYPE_NORMAL);
+	    Manager.host.requestCreateAttachedProc(args, runner);
+	}
 	while (true) {
 	    try {
 		runner.latch = new CountDownLatch(1);
@@ -235,6 +212,15 @@ class StartRun extends ParameterizedCommand {
 	runner.launchedTask.requestUnblock(runner);
     }
 
+    private String asString(String[] args) {
+	StringBuffer b = new StringBuffer(args[0]);
+	for (int i = 1; i < args.length; i++) {
+	    b.append(" ");
+	    b.append(args[i]);
+	}
+	return b.toString();
+    }
+
     /**
      * runProcs does as the name implies, it runs procs found to be loaded by a
      * load or a core command.
@@ -243,7 +229,7 @@ class StartRun extends ParameterizedCommand {
      * @param procs is the set of procs to be run
      * @param cmd is the command object to use to start the proc(s)
      */
-    private void runProcs(CLI cli, Set procs, Input cmd) {
+    private void runProcs(CLI cli, Set procs, Input cmd, boolean runToBreak) {
 	Iterator foo = procs.iterator();
 	int ctr = 0;
 	while (foo.hasNext()) {
@@ -256,61 +242,13 @@ class StartRun extends ParameterizedCommand {
 	    synchronized (cli) {
 		cli.taskID = taskid.intValue();
 	    }
-	    Input newcmd = new Input(proc.getExe() + " " +
-		    getParameters(cmd, proc.getMainTask()));
-	    cli.addMessage("starting/running with this command: " + 
-		    newcmd, Message.TYPE_NORMAL);
-	    run(cli, newcmd);
+	    run(cli, cmd, proc, runToBreak);
 	    synchronized (cli) {
 		cli.taskID = -1;
 	    }
 	}
     }
     
-    /**
-     * getParameters figures out what parameters to send back to start/run the process with;
-     * 	if no parameters are entered, use the previous ones if any were entered; if
-     *  parameters were entered, use those.
-     *  
-     * @param cmd is the Input object containing the command and any paramaters
-     * @param task is the Task object of the process that was previously run
-     * @return a String containing the parameters to be used in starting/running
-     *         the process
-     */
-
-    private String getParameters(Input cmd, Task task) {
-	if (cmd.size() < 1) {
-	    // No params entered, use this proc's previous params(if any)
-	    Proc proc = task.getProc();
-	    return parseParameters(proc.getCmdLine(), true);
-	} else//Proc had no previous params, send back empty param list
-	    // There were parameters entered, use those
-	    return parseParameters(cmd.stringArrayValue(), false);
-    }
-    
-    /**
-     * parseParameters takes a String array and returns a space-delimited String
-     * 
-     * @param parameters is the String array to convert
-     * @param which indicates whether or not to skip the first parameter
-     * @return a String of the parameters separated by spaces
-     */
-    private String parseParameters(String[] parameters, boolean which) {
-	if (parameters == null || parameters.length <= 0)
-		return "";
-	int i;
-	if (which)
-	    // In this case skip the first parameter which is the path to the process
-	    i = 1;
-	else
-	    // In this case, get all of the parameters which does not include the process
-	    i = 0;
-	String paramList = "";
-	for (int j = i; j < parameters.length; j++) 
-	    paramList = paramList + parameters[j] + " ";
-	    return paramList;
-    }
-    
     int completer(CLI cli, Input input, int cursor, List completions) {
 	return CompletionFactory.completeFileName(cli, input, cursor,
 		completions);
diff --git a/frysk-core/frysk/hpd/TestLoadCommand.java b/frysk-core/frysk/hpd/TestLoadCommand.java
index e79c94a..2903c4b 100644
--- a/frysk-core/frysk/hpd/TestLoadCommand.java
+++ b/frysk-core/frysk/hpd/TestLoadCommand.java
@@ -61,10 +61,7 @@ public class TestLoadCommand extends TestLib {
 	e = new HpdTestbed();
 	e.send("load " + Config.getPkgDataFile("test-exe-x86").getPath()
 		+ "foo\n");
-	e.expect("File does not exist or is not readable*");
-	e.send("quit\n");
-	e.expect("Quitting\\.\\.\\.");
-	e.close();
+	e.expect("Error: open: No such file or directory.*");
     }
     
     public void testLoadStart() {
@@ -114,4 +111,17 @@ public class TestLoadCommand extends TestLib {
 	e.expect("Quitting\\.\\.\\.");
 	e.close();
     }
+
+    public void testLoadExeArg() {
+	e = new HpdTestbed();
+	e.sendCommandExpectPrompt("load arg0 arg1 -exe /bin/ls",
+				  "/bin/ls\r\n");
+	e.sendCommandExpectPrompt("info args", "arg0\r\n" + "arg1\r\n");
+	e.sendCommandExpectPrompt("info exe", "/bin/ls\r\n");
+    }
+
+    public void testLoadPath() {
+	e = new HpdTestbed();
+	e.sendCommandExpectPrompt("load ls", "/bin/ls\r\n");
+    }
 }
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index a87161d..db646f0 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-04  Andrew Cagney  <cagney@redhat.com>
+
+	* Host.java (requestCreateAttachedProc(...)): Add File exe arg.
+	(requestCreateAttachedProc(Proc,TaskObserver.Attached)): New.
+	* TestRun.java: Update.
+
 2008-03-03  Andrew Cagney  <cagney@redhat.com>
 
 	* StressAttachDetachSignaledTask.java: Use frysk.config.
diff --git a/frysk-core/frysk/proc/Host.java b/frysk-core/frysk/proc/Host.java
index f1984ff..ef09cf2 100644
--- a/frysk-core/frysk/proc/Host.java
+++ b/frysk-core/frysk/proc/Host.java
@@ -39,6 +39,7 @@
 
 package frysk.proc;
 
+import java.io.File;
 import java.util.Collection;
 import java.util.Map;
 import java.util.HashMap;
@@ -115,7 +116,8 @@ public abstract class Host implements Comparable {
      * process - frysk's state machine could easily detach before the
      * requestor had an oportunity to add an attached observer.
      */
-    public abstract void requestCreateAttachedProc(String stdin,
+    public abstract void requestCreateAttachedProc(File exe,
+						   String stdin,
 						   String stdout,
 						   String stderr,
 						   String[] args,
@@ -124,11 +126,38 @@ public abstract class Host implements Comparable {
      * Request that a new attached and running process(with stdin,
      * stdout, and stderr are shared with this process) be created.
      */
-    public final void requestCreateAttachedProc(String[] args,
-						TaskObserver.Attached attachedObserver) {
-	fine.log(this, "requestCreateAttachedProc String[] TaskObserver.Attached"); 
-	requestCreateAttachedProc(null, null, null, args, attachedObserver);
+    public void requestCreateAttachedProc(String stdin, String stdout,
+					  String stderr, String[] args,
+					  TaskObserver.Attached attachedObserver) {
+	fine.log(this, "requestCreateAttachedProc", args, "observer",
+		 attachedObserver);
+	requestCreateAttachedProc(new File(args[0]), stdin, stdout, stderr,
+				  args, attachedObserver);
     }
+    /**
+     * Request that a new attached and running process(with stdin,
+     * stdout, and stderr are shared with this process) be created.
+     */
+    public void requestCreateAttachedProc(String[] args,
+					  TaskObserver.Attached attachedObserver) {
+	fine.log(this, "requestCreateAttachedProc", args, "observer",
+		 attachedObserver);
+	requestCreateAttachedProc(new File(args[0]), null, null, null,
+				  args, attachedObserver);
+    }
+    /**
+     * Request that a new attached and running process based on
+     * TEMPLATE be created.
+     */
+    public void requestCreateAttachedProc(Proc template,
+					  TaskObserver.Attached attachedObserver) {
+	fine.log(this, "requestCreateAttachedProc template", template,
+		 "observer", attachedObserver);
+	requestCreateAttachedProc(new File(template.getExe()),
+				  null, null, null,
+				  template.getCmdLine(),


hooks/post-receive
--
frysk system monitor/debugger


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]