doc
Functions
csync file lockling internals

Functions

int csync_lock (const char *lockfile)
 
void csync_lock_remove (const char *lockfile)
 

Detailed Description

Function Documentation

◆ csync_lock()

int csync_lock ( const char *  lockfile)

Lock the client if possible.

This functiion tries to lock the client with a lock file.

Parameters
lockfileThe lock file to create.
Returns
0 if the lock was successfull, less than 0 if the lock file couldn't be created or if it is already locked.

◆ csync_lock_remove()

void csync_lock_remove ( const char *  lockfile)

Remove the lockfile.

Only our own lock can be removed. This function can't remove a lock from another client.

Parameters
lockfileThe lock file to remove.