You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
856 B

  1. From 386b7ed79146ecf7a3bba49f48cb8f41a9b49170 Mon Sep 17 00:00:00 2001
  2. From: Jean-Francois Dockes <jf@dockes.org>
  3. Date: Sun, 27 Jan 2019 10:44:17 +0100
  4. Subject: [PATCH] Do not try to detach detached thread, the result is
  5. undefined. Fixes issue #102
  6. ---
  7. upnp/src/threadutil/ThreadPool.c | 5 -----
  8. 1 file changed, 5 deletions(-)
  9. --- a/upnp/src/threadutil/ThreadPool.c
  10. +++ b/upnp/src/threadutil/ThreadPool.c
  11. @@ -651,11 +651,6 @@ static int CreateWorker(
  12. rc = ithread_create(&temp, &attr, WorkerThread, tp);
  13. ithread_attr_destroy(&attr);
  14. if (rc == 0) {
  15. - rc = ithread_detach(temp);
  16. - /* ithread_detach will return EINVAL if thread has been
  17. - successfully detached by ithread_create */
  18. - if (rc == EINVAL)
  19. - rc = 0;
  20. tp->pendingWorkerThreadStart = 1;
  21. /* wait until the new worker thread starts */
  22. while (tp->pendingWorkerThreadStart) {