mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-30 11:56:33 -05:00
Adds pid file support.
This commit is contained in:
parent
875081f530
commit
bc2a837953
8 changed files with 149 additions and 14 deletions
15
util.h
15
util.h
|
|
@ -486,5 +486,20 @@ static inline oathash_t oathashm(oathash_t hash, const unsigned char* value, uns
|
|||
return hash;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
/* pid */
|
||||
|
||||
/**
|
||||
* Creates and locks the pid file.
|
||||
* Returns -1 on error, otherwise it's the file handle to pass to pid_unlock().
|
||||
*/
|
||||
int pid_lock(const char* file);
|
||||
|
||||
/**
|
||||
* Unlocks the pid file.
|
||||
* Returns -1 on error.
|
||||
*/
|
||||
int pid_unlock(int f, const char* file);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue