Internal change

PiperOrigin-RevId: 423070471
Change-Id: I876ef8f1d2464383ac319e196c1ba64c46ea4201
This commit is contained in:
Wiktor Garbacz 2022-01-20 08:09:19 -08:00 committed by Copybara-Service
parent 5c9f01fe3c
commit ae9432bc03

View File

@ -290,10 +290,7 @@ void ForkServer::LaunchChild(const ForkRequest& request, int execve_fd,
// A custom init process is only needed if a new PID NS is created.
if (request.clone_flags() & CLONE_NEWPID) {
// Spawn a child process
pid_t child;
{
child = fork();
}
pid_t child = fork();
if (child < 0) {
SAPI_RAW_PLOG(FATAL, "Could not spawn init process");
}