Skip to content

Commit 7b2f70e

Browse files
authored
Merge pull request #1857 from petterreinholdtsen/code-nowarn-pth-setname
Print stderr message if pthread_setname_np() fail
2 parents 973ecc3 + 19aefcc commit 7b2f70e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/rtapi/uspace_rtapi_app.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ static void set_namef(const char *fmt, ...) {
105105
va_end(ap);
106106

107107
int res = pthread_setname_np(pthread_self(), buf);
108+
if (res) {
109+
fprintf(stderr, "pthread_setname_np() failed for %s: %d\n", buf, res);
110+
}
108111
free(buf);
109112
}
110113

0 commit comments

Comments
 (0)