EINTR is not crash-worthy

This is how it should have been handled anyway. This fixes a (benign)
race condition when the server is killed, as well as gprof builds.

Also updated tdata.
This commit is contained in:
dongresource 2020-12-08 20:10:02 +01:00
parent d5409ed3f1
commit 86e0b1bc13
2 changed files with 5 additions and 1 deletions

View File

@ -312,6 +312,10 @@ void CNServer::start() {
// the timeout is to ensure shard timers are ticking
int n = poll(fds.data(), fds.size(), 50);
if (SOCKETERROR(n)) {
#ifndef _WIN32
if (errno == EINTR)
continue;
#endif
std::cout << "[FATAL] poll() returned error" << std::endl;
terminate(0);
}

2
tdata

@ -1 +1 @@
Subproject commit e9e03fd0f0ddc09a29db03cc68a5e5276712f2a7
Subproject commit 9a3991958689087a5846cac71edd16c82edbf09d