Exiting immediately to work around nvidia crash
This commit is contained in:
parent
f9c2801db1
commit
8df599ffe5
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue