Interface nsIProcessToolsServiceType

Hierarchy

Properties

Methods

Properties

pid: number

The pid for the current process.

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

  • Crash a process running on this system. Generates a SIGABRT on Linux and macOS, and a STATUS_ILLEGAL_INSTRUCTION on Windows.

    Does cause a crash report to be generated.

    Parameters

    • pid: number

    Returns void

  • Kill a process running on this system.

    Does not cause a crash report to be generated and sent.

    Note

    pid is the unique-to-the-system process identifier, as obtained with attribute pid of this service.

    Under Un*ix, that's what you obtain with getpid(), etc. Under Windows, that's what you obtain with GetCurrentProcessId(), NOT the same thing as the process HANDLE.

    Failure

    Under Windows, if two processes race to kill() a third process, or two threads race to kill() a process there is a (small) window during which this can cause a crash in the losing process.

    Caveats

    Under Windows, process killing is asynchronous. Therefore, this function can return before process pid is actually dead.

    Parameters

    • pid: number

    Returns void

Generated using TypeDoc