Skip to content

Commit

Permalink
feat: Move no-logging later in the code
Browse files Browse the repository at this point in the history
Move no logging later in the flow to get as many error messages as possible

Bug: N/A
Change-Id: I8a3101edf35d83175ad76c922c24d589327f5d36
GitOrigin-RevId: 1776f3b31093ca3ee501d47c425539dacdf7870e
  • Loading branch information
Privacy Sandbox Team authored and copybara-github committed Sep 25, 2024
1 parent 74db753 commit 995fb44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/roma/byob/container/run_workers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ int WorkerImpl(void* arg) {
PCHECK(::mount(binary_dir.c_str(), target.c_str(), nullptr, MS_BIND,
nullptr) == 0);
}
{
PCHECK(::dup2(worker_impl_arg.dev_null_fd, STDOUT_FILENO) != -1);
PCHECK(::dup2(worker_impl_arg.dev_null_fd, STDERR_FILENO) != -1);
}

// MS_REC needed here to get other mounts (/lib, /lib64 etc)
PCHECK(::mount(worker_impl_arg.pivot_root_dir.data(),
Expand Down Expand Up @@ -136,6 +132,10 @@ int WorkerImpl(void* arg) {
PCHECK(connection_fd != -1);
return absl::StrCat(connection_fd);
}();
{
PCHECK(::dup2(worker_impl_arg.dev_null_fd, STDOUT_FILENO) != -1);
PCHECK(::dup2(worker_impl_arg.dev_null_fd, STDERR_FILENO) != -1);
}
::execl(worker_impl_arg.binary_path.data(),
worker_impl_arg.binary_path.data(), connection_fd.c_str(), nullptr);
PLOG(FATAL) << "exec '" << worker_impl_arg.binary_path << "' failed";
Expand Down

0 comments on commit 995fb44

Please sign in to comment.