| 225 | } |
| 226 | |
| 227 | static void |
| 228 | lock_remove(void) |
| 229 | { |
| 230 | // To avoid race conditions, we must never unlink lock files. |
| 231 | // We just truncate them to zero length. |
| 232 | assert(lock_fd >= 0); |
| 233 | if (ftruncate(lock_fd, 0) < 0) |
| 234 | die("Cannot truncate lock file: %m"); |
| 235 | close(lock_fd); |
| 236 | lock_fd = -1; |
| 237 | } |
| 238 | |
| 239 | /*** Messages and exits ***/ |
| 240 |
no outgoing calls
no test coverage detected
searching dependent graphs…