content/common/sandbox_linux.cc
// Once we finally know our process type, we can cleanup proc_fd_
// or pass it to seccomp-legacy.
Once we finally know our process type, we can cleanup proc_fd_
or pass it to seccomp-legacy.
Once we finally know our process type we can cleanup proc_fd_ or pass it to seccomp - legacy .
void LinuxSandbox::PreinitializeSandboxFinish(
    const std::string& process_type) {
  CHECK(pre_initialized_);
  if (proc_fd_ >= 0) {
    if (ShouldEnableSeccompLegacy(process_type)) {
#if defined(SECCOMP_SANDBOX)
      SeccompSandboxSetProcFd(proc_fd_);
#endif
    } else {
      DCHECK_GE(proc_fd_, 0);
      CHECK_EQ(HANDLE_EINTR(close(proc_fd_)), 0);
    }
    proc_fd_ = -1;
  }
}
void LinuxSandbox :: PreinitializeSandboxFinish ( const std :: string & process_type ) { CHECK ( pre_initialized_ ) ; if ( proc_fd_ >= 0 ) { if ( ShouldEnableSeccompLegacy ( process_type ) ) { #if defined ( SECCOMP_SANDBOX ) SeccompSandboxSetProcFd ( proc_fd_ ) ; #endif } else { DCHECK_GE ( proc_fd_ , 0 ) ; CHECK_EQ ( HANDLE_EINTR ( close ( proc_fd_ ) ) , 0 ) ; } proc_fd_ = -1 ; } }
Once we finally know our process type, we can cleanup proc_fd_
or pass it to seccomp-legacy.
Once we finally know our process type we can cleanup proc_fd_ or pass it to seccomp - legacy .