file-dotlock.c revision 52f3cf26e1650cebd09109a4a655733c604f4751
2ronwalf#include "hex-binary.h"
2ronwalf#include "write-full.h"
2ronwalf#include "safe-mkstemp.h"
2ronwalf#include "nfs-workarounds.h"
2ronwalf#include "file-dotlock.h"
2ronwalfstruct file_change_info {
if (ret <= 0)
ret--;
if (pid <= 0)
return pid;
return TRUE;
return FALSE;
bool *changed_r)
bool changed;
int ret;
return ret;
return ret;
if (!changed) {
if (stale_timeout == 0) {
const char *str;
if (p != NULL) {
if (write_pid) {
int fd;
if (write_pid) {
case IO_NOTIFY_ADDED:
case IO_NOTIFY_NOTFOUND:
case IO_NOTIFY_NOSUPPORT:
const char *lock_path;
unsigned int stale_notify_threshold;
int ret;
bool do_wait;
if (do_wait) {
if (ret < 0)
tmp_path);
if (ret != 0)
unsigned int secs_left =
if (ret > 0) {
if (ret == 0)
return ret;
int old_errno;
const char *lock_path;
return ret;
int ret;
T_BEGIN {
} T_END;
return ret;
const char *lock_path;
const char *lock_path;
int ret;
T_BEGIN {
const char *lock_path;
} T_END;
if (ret <= 0) {
int fd;
return fd;
const char *lock_path;
int fd;
int ret = 0;
T_BEGIN {
} T_END;
return ret;
const char *lock_path;
return FALSE;
return FALSE;