mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
Add current PID in Lock file.
This commit is contained in:
parent
bcafd06748
commit
cf0360a172
1 changed files with 4 additions and 0 deletions
|
@ -892,6 +892,10 @@ int RsDirUtil::createLockFile(const std::string& lock_file_path, rs_lock_handle_
|
|||
return 2;
|
||||
}
|
||||
|
||||
// Write to lock file our pid
|
||||
std::string ourPID = std::to_string(::getpid());
|
||||
write(lock_handle, ourPID.c_str(), sizeof(char)*ourPID.size() );
|
||||
|
||||
return 0;
|
||||
#else
|
||||
// Suspended. The user should make sure he's not already using the file descriptor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue