struct lock_uds
{ char *filename; ///<< Name of the lock file int fd; ///<< File descriptor for open file int pid; ///<< PID of process originally taking out lock
};
/******************************************************************************/ void
unlock_uds(struct lock_uds *lock)
{ if (lock != NULL)
{ if (lock->fd >= 0)
{
g_file_close(lock->fd);
lock->fd = -1; // In case of use-after-free
}
/* Only delete the lock file if we are the process which
* created it */ if (g_getpid() == lock->pid)
{
g_file_delete(lock->filename);
}
g_free(lock->filename);
lock->filename = NULL;
g_free(lock);
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-07-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.