From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252136
91177308-0d34-0410-b5e6-
96231b3b80d8
// during handling an actual signal because you can't safely call new in a
// signal handler.
*SignalsMutex;
-
+
// If the handlers are already registered, we're done.
if (NumRegisteredSignals != 0) return;
// super-user permissions.
if (!S_ISREG(buf.st_mode))
continue;
-
+
// Otherwise, remove the file. We ignore any errors here as there is nothing
// else we can do.
unlink(path);