reset extern compilers in forked processes
commit14c55212f5750415e28613cf4c56a5115fcd499d
authorVladimir Matveev <vladima@fb.com>
Sat, 6 Jan 2018 04:17:41 +0000 (5 20:17 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sat, 6 Jan 2018 04:38:25 +0000 (5 20:38 -0800)
treead0022723bb08e0588347ef4899f039e75ce0b52
parentb6d97d4c476f08650e6a20a03da7256854ad8479
reset extern compilers in forked processes

Summary:
Currently if child process created by `fork` exits - it shuts down compiler pool from the parent process. In this diff after `fork` child process detaches itself from inherited set of compilers. In case of child process itself will need to use compiler  (in case of `eval` or `require` / autoload of something that was not yet loaded) - compilers will be created and initialized on demand.

Also this diff consolidates all global state used by extern-compiler.cpp under the umbrella of `CompilerManager` class.

Reviewed By: hubyrod

Differential Revision: D6614660

fbshipit-source-id: 166fa33be1db7b46ceda37ecf01773243dda897c
hphp/compiler/compiler.cpp
hphp/runtime/base/program-functions.cpp
hphp/runtime/ext/process/ext_process.cpp
hphp/runtime/vm/extern-compiler.cpp
hphp/runtime/vm/extern-compiler.h
hphp/test/hackc_failing_tests_slow
hphp/test/hackc_repo_failing_tests_slow
hphp/test/slow/ext_process/ext_process_eval.php [new file with mode: 0644]
hphp/test/slow/ext_process/ext_process_eval.php.expect [new file with mode: 0644]
hphp/test/slow/ext_process/ext_process_eval.php.norepo [new file with mode: 0644]