This example procedure uses the prctl command to temporarily add a new privileged value to deny the use of more than three LWPs per project for the x-files project. The result is comparable to the result in How to Set the Maximum Number of LWPs for Each Task in a Project.
Become superuser or assume an equivalent role.
Use newtask to join the x-files project.
# newtask -p x-files |
Use the id command with the -p option to verify that the correct project has been joined.
# id -p uid=0(root) gid=1(other) projid=101(x-files) |
Add a new privileged value for project.max-lwps that limits the number of LWPs to three.
# prctl -n project.max-lwps -t privileged -v 3 -e deny -i project x-files |
Verify the result.
# prctl -n project.max-lwps -i project x-files process: 111108: csh NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT project.max-lwps privileged 3 - deny - system 2.15G max deny - |