mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-02 18:44:53 -05:00
Merge pull request #2127 from PhenomRetroShare/Add_PID_InLockFile
Add current PID in Lock file.
This commit is contained in:
commit
41357489c0
@ -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…
x
Reference in New Issue
Block a user