Interface nsIProcessType

Hierarchy

Properties

exitValue: number

The exit value of the process. This is only valid after the process has exited.

isRunning: boolean

Returns whether the process is currently running or not.

noShell: boolean

When set to true the process will be launched directly without using the shell. This currently affects only the Windows platform.

pid: number

The process identifier of the currently running process. This will only be available after the process has started and may not be available on some platforms.

startHidden: boolean

When set to true the process will not open a new window when started and will run hidden from the user. This currently affects only the Windows platform.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Initialises the process with an executable to be run. Call the run method to run the executable.

    Parameters

    • executable: nsIFile

      The executable to run.

    Returns void

  • Kills the running process. After exiting the process will either have been killed or a failure will have been returned.

    Returns void

  • Executes the file this object was initialized with

    Parameters

    • blocking: boolean

      Whether to wait until the process terminates before returning or not.

    • args: string

      An array of arguments to pass to the process in the native character set.

    • count: number

      The length of the args array.

    Returns void

  • Executes the file this object was initialized with optionally calling an observer after the process has finished running.

    Parameters

    • args: string

      An array of arguments to pass to the process in the native character set.

    • count: number

      The length of the args array.

    • observer: nsIObserver

      An observer to notify when the process has completed. It will receive this process instance as the subject and "process-finished" or "process-failed" as the topic. The observer will be notified on the main thread.

    • holdWeak: boolean

      Whether to use a weak reference to hold the observer.

    Returns void

  • Executes the file this object was initialized with

    Parameters

    • blocking: boolean

      Whether to wait until the process terminates before returning or not.

    • args: wstring

      An array of arguments to pass to the process in UTF-16

    • count: number

      The length of the args array.

    Returns void

  • Executes the file this object was initialized with optionally calling an observer after the process has finished running.

    Parameters

    • args: wstring

      An array of arguments to pass to the process in UTF-16

    • count: number

      The length of the args array.

    • observer: nsIObserver

      An observer to notify when the process has completed. It will receive this process instance as the subject and "process-finished" or "process-failed" as the topic. The observer will be notified on the main thread.

    • holdWeak: boolean

      Whether to use a weak reference to hold the observer.

    Returns void

Generated using TypeDoc