Salome HOME
bos #41337 [CEA][Windows] YACS compilation broken
[modules/yacs.git] / src / runtime_swig / ThreadLauncher.cxx
index ff5b83c2ecb375fdb25d273dc2ef6a605eb5df63..5e3de2bfe2fd6a7a00b09eea462de4dea1a2413d 100644 (file)
@@ -42,13 +42,18 @@ void ThreadDumpState::run()
   {
 #ifdef WIN32
     Sleep(_nb_seconds);
+       std::string cmd = "COPY /b " + _lock_file + " +,,";
 #else 
     sleep(_nb_seconds);
-#endif
     std::string cmd = "touch " + _lock_file;
+#endif
     system(cmd.c_str());
     schemaSaveStateUnsafe(_proc,_dump_file);
+#ifdef WIN32
+    cmd = "DEL /Q /F " + _lock_file;
+#else
     cmd = "rm -f " + _lock_file;
+#endif
     system(cmd.c_str());
     state = _proc->getEffectiveState();
   }