Exiting immediately to work around nvidia crash

This commit is contained in:
Jonas Kvinge 2018-06-07 02:04:26 +02:00
parent f9c2801db1
commit 8df599ffe5
1 changed files with 19 additions and 3 deletions

View File

@ -43,6 +43,10 @@
# include <QDBusArgument>
#endif
#ifdef Q_OS_UNIX
# include <unistd.h>
#endif
#ifdef Q_OS_DARWIN
# include <sys/resource.h>
# include <sys/sysctl.h>
@ -222,5 +226,17 @@ int main(int argc, char* argv[]) {
int ret = a.exec();
#ifdef Q_OS_LINUX
QFile self_maps("/proc/self/maps");
if (self_maps.open(QIODevice::ReadOnly)) {
QByteArray data = self_maps.readAll();
if (data.contains("libnvidia-tls.so.")) {
qLog(Warning) << "Exiting immediately to work around NVIDIA driver bug";
_exit(ret);
}
self_maps.close();
}
#endif
return ret;
}