| 217 | } |
| 218 | |
| 219 | static bool remove_obstruction(Child *child) { |
| 220 | struct stat now; |
| 221 | if (!child->owns_obstruction || lstat(child->profile, &now) != 0 || !S_ISDIR(now.st_mode) || |
| 222 | now.st_dev != child->obstruction.st_dev || now.st_ino != child->obstruction.st_ino || |
| 223 | !note(child, "obstacle_reaped", -1, 1)) |
| 224 | return false; |
| 225 | /* rmdir removes only our same, still-empty directory, after child reap and receipt. */ |
| 226 | if (rmdir(child->profile) != 0) |
| 227 | return false; |
| 228 | child->owns_obstruction = false; |
| 229 | return note(child, "obstacle_removed", -1, 1); |
| 230 | } |
| 231 | |
| 232 | static bool held_protocol(Child *child) { |
| 233 | if (child->operation >= EXEC_VE && child->operation <= EXEC_L) { |
no test coverage detected