Help with prlimit
Mike Frysinger
vapier@gentoo.org
Fri Mar 17 03:12:00 GMT 2017
On 22 Jan 2017 22:36, Vasantha Ganesh wrote:
> prlimit used with RLIMIT_CPU sends SIGXCPU to the process whose pid
> was mentioned as an argument (subprocess). I would like it if the
> parent process were the one who received the SIGXCPU or any other
> custom signal, then the parent process can decide what to do with that
> subprocess. Like it can suspend it or kill it, things like that. To
> create such a function what part of the code-base should I read or
> work on? I don't have control over what subprocess I'm going to run so
> I want to give a couple of subprocess a fixed equal amount of time for
> execution. I believe I have to hack on with prlimit to achieve this.
all of the rlimit logic is in the kernel. glibc merely provides an API
to users to easily call into it.
if you want to limit CPU utilization, you might want to look into control
groups instead. which is also outside of glibc ;).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-help/attachments/20170317/904f24c8/attachment.sig>
More information about the Libc-help
mailing list