Bug 1870926 [wpt PR 43734] - Remove experimental ::details-summary pseudo-element...
[gecko.git] / toolkit / components / processtools / nsIProcessToolsService.idl
blob4298cdddf8fb9e4059cc9ecd561fb094d5cb780e
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 [scriptable, uuid(1341f571-ebed-4305-b264-4d8fc3b6b11c)]
8 interface nsIProcessToolsService: nsISupports {
9 /**
10 * Kill a process running on this system.
12 * Does not cause a crash report to be generated and sent.
14 * # Note
16 * `pid` is the unique-to-the-system process identifier, as
17 * obtained with attribute `pid` of this service.
19 * Under Un*ix, that's what you obtain with `getpid()`, etc.
20 * Under Windows, that's what you obtain with `GetCurrentProcessId()`,
21 * NOT the same thing as the process `HANDLE`.
23 * # Failure
25 * Under Windows, if two processes race to `kill()` a third process,
26 * or two threads race to `kill()` a process there is a (small) window
27 * during which this can cause a crash in the losing process.
29 * # Caveats
31 * Under Windows, process killing is asynchronous. Therefore, this
32 * function can return before process `pid` is actually dead.
34 void kill(in unsigned long long pid);
36 /**
37 * Crash a process running on this system. Generates a SIGABRT on Linux and
38 * macOS, and a STATUS_ILLEGAL_INSTRUCTION on Windows.
40 * Does cause a crash report to be generated.
42 void crash(in unsigned long long pid);
44 /**
45 * The pid for the current process.
47 readonly attribute unsigned long long pid;