mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Merge pull request #113 from triplef/fix-pthread-setname
Use pthread_setname_np result instead of errno.
This commit is contained in:
commit
2dae7185f4
2 changed files with 7 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-03-29 Frederik Seiffert <frederik@algoriddim.com>
|
||||
|
||||
* Source/NSThread.m: Use pthread_setname_np result instead of errno,
|
||||
which fixes setting thread name on platforms where errno is not set.
|
||||
|
||||
2020-03-29 Frederik Seiffert <frederik@algoriddim.com>
|
||||
|
||||
* Source/NSURLResponse.m: Fix parsing of NSURLResponse content type
|
||||
|
|
|
@ -1241,12 +1241,7 @@ unregisterActiveThread(NSThread *thread)
|
|||
}
|
||||
while (i > 0)
|
||||
{
|
||||
if (PTHREAD_SETNAME(buf) == 0)
|
||||
{
|
||||
break; // Success
|
||||
}
|
||||
|
||||
if (ERANGE == errno)
|
||||
if (PTHREAD_SETNAME(buf) == ERANGE)
|
||||
{
|
||||
/* Name must be too long ... gnu/linux uses 15 characters
|
||||
*/
|
||||
|
@ -1274,7 +1269,7 @@ unregisterActiveThread(NSThread *thread)
|
|||
}
|
||||
else
|
||||
{
|
||||
break; // Some other error
|
||||
break; // Success or some other error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue