- Code: Select all
[0620/072835.483647:ERROR:process_posix.cc(343)] Unable to terminate process 59512: No such process (3)
I added print statements to cefsimple to print the thread IDs, and made sure that CefRunMessageLoop(), CefQuitMessageLoop(), and CefShutdown() are being called from the same thread.
I found some version of process_posix.cc online, and noticed that the section of the code that produces this message, has a IS_CHROMEOS guard:
- Code: Select all
bool Process::Terminate(int exit_code, bool wait) const {
// exit_code isn't supportable.
DCHECK(IsValid());
CHECK_GT(process_, 0);
// RESULT_CODE_KILLED_BAD_MESSAGE == 3, but layering prevents its use.
// |wait| is always false when terminating badly-behaved processes.
const bool maybe_compromised = !wait && exit_code == 3;
if (maybe_compromised) {
// Forcibly terminate the process immediately.
const bool was_killed = kill(process_, SIGKILL) != 0;
#if BUILDFLAG(IS_CHROMEOS)
if (was_killed)
CleanUpProcessAsync();
#endif
DPLOG_IF(ERROR, !was_killed) << "Unable to terminate process " << process_;
return was_killed;
}
// Terminate process giving it a chance to clean up.
if (kill(process_, SIGTERM) != 0) {
DPLOG(ERROR) << "Unable to terminate process " << process_;
return false;
}
#if BUILDFLAG(IS_CHROMEOS)
CleanUpProcessAsync();
#endif
if (!wait || WaitForExitWithTimeout(Seconds(60), nullptr)) {
return true;
}
if (kill(process_, SIGKILL) != 0) {
DPLOG(ERROR) << "Unable to kill process " << process_;
return false;
}
return WaitForExit(nullptr);
}
Any ideas on how to fix this error are welcome! We can't leave this error in production code, especially since our customers will be using CEF windowless, from the command line.