In order to no longer need the forked version of the python-prctl repo, we need to provide a solution that would work for the following elements of the RIAPS pycom code.
riaps/deplo/depm.py currently uses the following code for real-time actors:
if rt_actor:
prctl.cap_inheritable.sys_nice = True
prctl.cap_permitted.sys_nice = True
prctl.securebits.keep_caps = True
prctl.set_ambient(prctl.CAP_SYS_NICE,True)
os.setgid(user_gid)
os.setuid(user_uid)
if rt_actor:
prctl.cap_permitted.limit(prctl.CAP_SYS_NICE)
prctl.cap_inheritable.sys_nice = True
prctl.cap_permitted.sys_nice = True
prctl.cap_effective.sys_nice = True
prctl.set_ambient(prctl.CAP_SYS_NICE,True)
return result
riaps/run/actor.py uses
prctl.cap_effective.limit() # Drop all capabilities
prctl.cap_permitted.limit()
prctl.cap_inheritable.limit()
There is an example RIAPS application in tests/DistributedEstimatorRT - GlobalEstimator.py and Sensor.py which use the feature by calling flag = prctl.cap_permitted.sys_nice
In order to no longer need the forked version of the python-prctl repo, we need to provide a solution that would work for the following elements of the RIAPS pycom code.
riaps/deplo/depm.py currently uses the following code for real-time actors:
riaps/run/actor.py uses
There is an example RIAPS application in tests/DistributedEstimatorRT - GlobalEstimator.py and Sensor.py which use the feature by calling
flag = prctl.cap_permitted.sys_nice