Skip to content

Provide an implementation to replace the need for the python-prctl forked repo  #198

Description

@MMetelko

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions