fix(container): when running in fedora-generic-kerner container, no setting of priority
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -234,9 +234,10 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
|
||||
ret=pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
|
||||
|
||||
if (system("grep -iq 'ID_LIKE.*fedora' /etc/os-release && uname -a | grep -c rt")==0)
|
||||
if (system("cat /proc/self/cgroup | egrep -c 'libpod|podman|kubepods'")==0)
|
||||
settingPriority = 0;
|
||||
if (checkIfFedoraDistribution())
|
||||
if (checkIfGenericKernelOnFedora())
|
||||
if (checkIfInsideContainer())
|
||||
settingPriority = 0;
|
||||
|
||||
if (settingPriority) {
|
||||
ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
||||
|
||||
Reference in New Issue
Block a user