Browse Source

util: Don't block SIGSYS for new threads

SIGSYS is needed for programs using seccomp for sandboxing.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
tags/19.1-branchpoint
Drew Davenport 6 years ago
parent
commit
1fd79b4b6d
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/util/u_thread.h

+ 2
- 1
src/util/u_thread.h View File

@@ -44,7 +44,8 @@ static inline thrd_t u_thread_create(int (*routine)(void *), void *param)
int ret;

sigfillset(&new_set);
pthread_sigmask(SIG_SETMASK, &new_set, &saved_set);
sigdelset(&new_set, SIGSYS);
pthread_sigmask(SIG_BLOCK, &new_set, &saved_set);
ret = thrd_create( &thread, routine, param );
pthread_sigmask(SIG_SETMASK, &saved_set, NULL);
#else

Loading…
Cancel
Save