sapling/eden/fs/service
Wez Furlong 154d7309c9 eden: introduce SpawnedProcess
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
2020-09-01 13:31:32 -07:00
..
oss split runEdenMain out from EdenMain 2020-03-26 16:19:25 -07:00
test eden: introduce SpawnedProcess 2020-09-01 13:31:32 -07:00
.gitignore watchman: pull in thrift in the oss build for eden support 2019-02-04 21:37:47 -08:00
CMakeLists.txt unify the EdenMain code on Windows 2020-05-28 09:01:03 -07:00
eden.thrift eden prefetch record-profile and eden prefetch finish-profile 2020-08-04 06:50:45 -07:00
EdenCPUThreadPool.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
EdenCPUThreadPool.h Tidy up license headers 2019-10-11 05:28:23 -07:00
EdenError.cpp add EdenErrorType to EdenError 2019-10-29 09:23:03 -07:00
EdenError.h Remove thrift setters 2020-07-13 14:30:00 -07:00
EdenInit.cpp move UserInfo to eden/fs/utils/ 2020-04-29 17:21:12 -07:00
EdenInit.h add a new process to monitor EdenFS 2020-01-31 13:22:26 -08:00
EdenMain.cpp introduce metadata importer 2020-07-10 16:03:32 -07:00
EdenMain.h introduce metadata importer 2020-07-10 16:03:32 -07:00
EdenServer.cpp run edenfsctl redirect fixup after mout is done 2020-08-24 21:38:12 -07:00
EdenServer.h don't print fsck progress bars when fsck does not happen 2020-08-05 18:27:34 -07:00
EdenServiceHandler.cpp add ObjectFetchContext with causeDetail field 2020-09-01 03:39:18 -07:00
EdenServiceHandler.h eden prefetch record-profile and eden prefetch finish-profile 2020-08-04 06:50:45 -07:00
EdenStateDir.cpp fix issues when checking EdenFS status on windows 2020-04-15 15:46:24 -07:00
EdenStateDir.h exit if the EdenFS lock file ever becomes invalid 2020-03-26 20:17:12 -07:00
fb-edenfs@.service set OOMScoreAdjust to -20 in systemd unit 2019-10-02 12:53:28 -07:00
PeriodicTask.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
PeriodicTask.h Tidy up license headers 2019-10-11 05:28:23 -07:00
PrettyPrinters.cpp Migrate to field_ref Thrift API 2020-07-21 11:23:35 -07:00
PrettyPrinters.h Tidy up license headers 2019-10-11 05:28:23 -07:00
StartupLogger.cpp unify the StartupLogger code on Windows and POSIX 2020-04-30 23:36:49 -07:00
StartupLogger.h use logVerbose for fsck bars 2020-07-30 08:47:54 -07:00
streamingeden.thrift enable py3 thrift language 2020-06-10 19:29:17 -07:00
Systemd.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
Systemd.h Tidy up license headers 2019-10-11 05:28:23 -07:00
ThriftPermissionChecker.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
ThriftPermissionChecker.h Tidy up license headers 2019-10-11 05:28:23 -07:00
ThriftUtil.h add EdenErrorType to EdenError 2019-10-29 09:23:03 -07:00