Fix restarting global forkserver
PiperOrigin-RevId: 376643949
Change-Id: I5811e8b8a9f5e74cab21d021c8e83b2a4b91818a
diff --git a/sandboxed_api/sandbox2/global_forkclient.cc b/sandboxed_api/sandbox2/global_forkclient.cc
index 254adc0..af0286b 100644
--- a/sandboxed_api/sandbox2/global_forkclient.cc
+++ b/sandboxed_api/sandbox2/global_forkclient.cc
@@ -121,7 +121,7 @@
std::unique_ptr<GlobalForkClient> StartGlobalForkServer() {
file_util::fileops::FDCloser exec_fd(
- sapi::EmbedFile::GetEmbedFileSingleton()->GetFdForFileToc(
+ sapi::EmbedFile::GetEmbedFileSingleton()->GetDupFdForFileToc(
forkserver_bin_embed_create()));
SAPI_RAW_CHECK(exec_fd.get() >= 0, "Getting FD for init binary failed");