mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
update sub-instance lifetime
This commit is contained in:
parent
ee9b2ab266
commit
5a8fd3ceab
4 changed files with 12 additions and 5 deletions
|
|
@ -296,7 +296,8 @@ public:
|
|||
|
||||
void terminate() final override {
|
||||
#ifdef __linux__
|
||||
kill(pid, SIGKILL);
|
||||
logger.info() << "terminating " << pid;
|
||||
kill(pid, SIGTERM);
|
||||
#elif defined(_WIN32)
|
||||
if (processHandle != nullptr) {
|
||||
TerminateProcess(processHandle, 1);
|
||||
|
|
@ -461,10 +462,11 @@ std::unique_ptr<Process> platform::new_engine_instance(
|
|||
_exit(127);
|
||||
} else {
|
||||
close(fd);
|
||||
usleep(1000); // waiting for execvp call
|
||||
return std::make_unique<SystemProcess>(pid);
|
||||
}
|
||||
}
|
||||
#endif // __APPLE_
|
||||
#endif
|
||||
|
||||
std::stringstream ss;
|
||||
ss << executable;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue