mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
154d7309c9
Summary: This commit introduces a new process spawning class derived from the ChildProcess class in the watchman codebase. `SpawnedProcess` is similar to folly::Subprocess but is designed around the idea that we will use a system provided spawning API to start a process, rather than assuming the use of `fork`. `fork` is to be avoided because it can be expensive for processes with large address spaces and also because it interacts poorly with threads on macOS. In particular, we see the objC runtime terminating our process in some scenarios where fork and threads are mixed. There are some important differences from `folly::Subprocess` and that means that some assumptions and uses need to be altered slightly from their prior workings. For example, detaching a SpawnedProcess moves the responsibility of waiting on the child to a periodic task as there is no way to detach via posix_spawn without also using fork. On the plus side, this commit allows unifying spawning between posix and windows systems, which simplifies the code! Reviewed By: xavierd Differential Revision: D23287763 fbshipit-source-id: b662af1d7eaaa9ed445c42f6c5765ae9af975eea |
||
---|---|---|
.. | ||
fs | ||
integration | ||
locale | ||
mononoke | ||
scm | ||
scripts | ||
test_support | ||
test-data | ||
.clang-format | ||
.gitignore | ||
Eden.project.toml |