We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a81232c commit d4e2cdcCopy full SHA for d4e2cdc
Python/traceback.c
@@ -1039,6 +1039,17 @@ _Py_DumpTraceback(int fd, PyThreadState *tstate)
1039
dump_traceback(fd, tstate, 1);
1040
}
1041
1042
+#if defined(HAVE_PTHREAD_GETNAME_NP) || defined(HAVE_PTHREAD_GET_NAME_NP)
1043
+# if defined(__OpenBSD__)
1044
+ /* pthread_*_np functions, especially pthread_{get,set}_name_np().
1045
+ pthread_np.h exists on both OpenBSD and FreeBSD but the latter declares
1046
+ pthread_getname_np() and pthread_setname_np() in pthread.h as long as
1047
+ __BSD_VISIBLE remains set.
1048
+ */
1049
+# include <pthread_np.h>
1050
+# endif
1051
+#endif
1052
+
1053
/* Write the thread identifier into the file 'fd': "Current thread 0xHHHH:\" if
1054
is_current is true, "Thread 0xHHHH:\n" otherwise.
1055
0 commit comments