@ -184,6 +184,15 @@ void SHM_Destroy ( void )
fd_svlock = 0;
fd_cllock = 0;
// destroy lock files
char name[256];
char name2[256];
sprintf(name, "/tmp/DFHack/%d",OS_getPID());
sprintf(name2, "%s/SVlock",name);
unlink(name2);
sprintf(name2, "%s/CLlock",name);
rmdir(name);
fprintf(stderr,"dfhack: destroyed shared segment.\n");
inited = false;
}