gecko-dev/toolkit/modules/subprocess
Jed Davis 996eb87d1d Bug 1276388 - Use IPC process launching for Subprocess.jsm on Unix. r=kmag,nika,barret
Currently, Subprocess.jsm on Unix uses js-ctypes to call `posix_spawn`.
This has some issues, primarily that file descriptors are inherited by
the child process unless explicitly opted-out, which unfortunately a lot
of code doesn't do.  This patch changes it to use IPC process launching,
where fd inheritance is opt-in, by:

1. Extending `base::LaunchApp` to handle a few features that Subprocess
   needs (setting the process's working directory, specifying the full
   environment, and the macOS `disclaim` flag)

2. Adding a WebIDL method to `IOUtils` to expose that function to JS
   (currently Unix-only; Windows could also be supported but it would
   probably want to use a different IDL type for strings, given that the
   OS APIs use 16-bit code units).

3. Replacing the part of Subprocess that invokes `posix_spawn` (and
   related functions) by calling that method; the rest of Subprocess's
   machinery to manage pipes and I/O is unchanged.  (The Windows backend
   is also unchanged; I'm not aware of any functional issues there.)
   This results in some dead code, which is removed.

Differential Revision: https://phabricator.services.mozilla.com/D152336
2022-08-09 17:32:22 +00:00
..
docs
test/xpcshell Bug 1781782 - Run frequent xpcshell parallel failing tests sequential by default. r=ahal,necko-reviewers,extension-reviewers,application-update-reviewers,bytesized,rpl,kershaw 2022-07-30 01:33:28 +00:00
.eslintrc.js
moz.build
Subprocess.jsm
subprocess_common.jsm Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu 2022-07-11 12:41:50 +00:00
subprocess_shared.js
subprocess_shared_unix.js Bug 1276388 - Use IPC process launching for Subprocess.jsm on Unix. r=kmag,nika,barret 2022-08-09 17:32:22 +00:00
subprocess_shared_win.js Backed out changeset a5b0a803821d (bug 1772942) for causing multiple failures. CLOSED TREE 2022-06-30 09:54:27 +03:00
subprocess_unix.jsm Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu 2022-07-11 12:41:50 +00:00
subprocess_win.jsm Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo 2022-07-12 04:21:34 +00:00
subprocess_worker_common.js Bug 1276388 - Use IPC process launching for Subprocess.jsm on Unix. r=kmag,nika,barret 2022-08-09 17:32:22 +00:00
subprocess_worker_unix.js Bug 1276388 - Use IPC process launching for Subprocess.jsm on Unix. r=kmag,nika,barret 2022-08-09 17:32:22 +00:00
subprocess_worker_win.js