update sub-instance lifetime

This commit is contained in:
MihailRis 2026-08-01 22:32:49 +03:00
parent ee9b2ab266
commit 5a8fd3ceab
4 changed files with 12 additions and 5 deletions

View file

@ -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;