MCPcopy Create free account
hub / github.com/ioi/isolate / lock_remove

Function lock_remove

isolate.c:227–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227static void
228lock_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

Callers 1

cleanupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…