This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with prlimit


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

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]