NsIProcess
Jump to navigation
Jump to search
nsIProcess API Proposal
First draft API Proposal
Although code will be written in standard XPCOM, the first draft proposal only describes how the API will look from javascript.
Sample Usage
// first argument is the executable
var arguments = ["argument1", "argument2"];
// create nsIProcess
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
// start the executable
process.open(arguments, arguments.length)
// alternatively it could opened with interprocess communication
process.open(arguments, arguments.length, stdin, stdout, stderr)
// stdin
// stdout
// stderr
// check if the executable is still running
process.isRunning()
// stop the process
process.close()
Reference
Project page: Fixing nsIProcess