RDC crash when exit
Join the signal handling thread instead of cancel it to prevent
crash with "terminate called without an active exception".
Change-Id: I2e18eb825728fd3a94f67b1b0049516bb7b6ebbc
[ROCm/rdc commit: 1ab4110d46]
Этот коммит содержится в:
коммит произвёл
Shuzhou Liu
родитель
ff9f16b7b5
Коммит
a59c9e655b
@@ -696,12 +696,14 @@ int main(int argc, char** argv) {
|
||||
|
||||
rdc_server.Run();
|
||||
|
||||
thr_ret = pthread_cancel(sig_listen_thread);
|
||||
// join the thread to prevent the program terminated
|
||||
void* ret = nullptr;
|
||||
thr_ret = pthread_join(sig_listen_thread, &ret);
|
||||
|
||||
// don't fail if it doesn't succeed
|
||||
if (thr_ret) {
|
||||
if (thr_ret != 0) {
|
||||
std::cerr <<
|
||||
"Failed to terminate ProcessSignalLoop. pthread_cancel() returned " <<
|
||||
"Failed to terminate ProcessSignalLoop. pthread_join() returned " <<
|
||||
thr_ret;
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user