Fix bug with syncing config within a multi-threaded java process

This commit is contained in:
Jeremy Lakeman 2016-04-13 09:44:29 +09:30
parent c7203ee639
commit ebb7500119

View File

@ -70,6 +70,9 @@ void cli_cleanup(){
*/
int server_pid()
{
// Note that if we close another handle on the same file, our lock will disappear.
if (server_getpid == getpid())
return server_getpid;
char dirname[1024];
if (!FORMF_SERVAL_RUN_PATH(dirname, NULL))
return -1;