The return type matches the `clone` function parameter in `process::subprocess`.
| 141 | // The return type matches the `clone` function parameter in |
| 142 | // `process::subprocess`. |
| 143 | static Option<lambda::function<pid_t(const lambda::function<int()>&)>> |
| 144 | getCustomCloneFunc(const Option<runtime::Plain>& plain) |
| 145 | { |
| 146 | if (plain.isNone() || plain->namespaces.empty()) { |
| 147 | return None(); |
| 148 | } |
| 149 | |
| 150 | #ifdef __linux__ |
| 151 | return lambda::bind( |
| 152 | &cloneWithSetns, |
| 153 | lambda::_1, |
| 154 | plain->taskPid, |
| 155 | plain->namespaces); |
| 156 | #else |
| 157 | return None(); |
| 158 | #endif // __linux__ |
| 159 | } |
| 160 | |
| 161 | |
| 162 | // Reads `ProcessIO::Data` records from a string containing "Record-IO" |
no test coverage detected