| 108 | auto child = [=]() -> int { |
| 109 | if (taskPid.isSome()) { |
| 110 | foreach (const string& ns, namespaces) { |
| 111 | Try<Nothing> setns = ns::setns(taskPid.get(), ns); |
| 112 | if (setns.isError()) { |
| 113 | // This effectively aborts the check. |
| 114 | LOG(FATAL) << "Failed to enter the " << ns << " namespace of task" |
| 115 | << " (pid: " << taskPid.get() << "): " << setns.error(); |
| 116 | } |
| 117 | |
| 118 | VLOG(1) << "Entered the " << ns << " namespace of task" |
| 119 | << " (pid: " << taskPid.get() << ") successfully"; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | return func(); |