4
This file provides an introduction into the modules provided by this package.
5
Working examples can be found in the test/ directory.
9
A service that provides high-level access to the other components.
10
The most important methods are various variants of execPipe, which
11
allow to execute a file in blocking or non-blocking way, pass
12
information through stdin to the executed comamnd, and get back
13
the output from stdout and stderr (see below for more details).
15
The input/output is done via the nsIIPCRequest interface provided.
20
Implements nsIRequest.
22
The nsIPipeTransport interface executes a file in a new process and
23
communicates with the process using pipes.
25
OWNERSHIP AND THREADING MODEL for nsPipeTransport:
27
nsPipeTransport can be created in any thread with an event queue.
29
nsPipeTransport lives only in the thread that it was created in.
31
nsPipeTransport creates a helper thread object, nsStdoutPoller and
32
retains an owning reference to it. nsStdoutPoller also holds a strong
33
reference to a proxy interface (nsIPipeTransportListener) implemented by
34
nsPipeTransport, which is released when the polling thread terminates.
36
The polling thread terminates when it is "interrupted" by
37
nsPipeTransport or when EOF/error is encountered in reading data from
40
The "terminate" method should *always* be called to release the process
43
For asynchronous reading, when nsStdoutPoller terminates of its own
44
accord, any stream listener is informed by invoking OnStopRequest.
45
Usually this listener will be the same as the owner of nsPipeTransport.
46
(If the owner initiates the request shutdown by first calling "cancel",
47
then the OnStopRequest method is *notinvoked, because it is assumed that
48
the listener/owner is already aware of the shutdown.)
53
Implements a nsIStreamListener sink (thread-safe).
58
Extends nsIPipeListener. nsIIPCBuffer is an interface to a byte buffer.
59
In order to ensure data integrity, it uses a monitor.
64
Implements a nsIChannel interface. The nsIPipeChannel interface executes
65
a program in a new process and communicates with the process using pipes.
70
Another extension of nsIPipeListener.
71
nsIPipeConsole is an interface to a circular text console buffer
72
(i.e. to capture the results from a pipe).
77
Implements nsIStreamListener; allows to filter the data of the stream.
83
Provides methods for obtaining information about the process.
84
Currently only getEnv() is available.