lkml.org 
[lkml]   [2010]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 10/11] rlimits: implement prlimit64 syscall
On Wed, 26 May 2010 14:58:05 +0200 Jiri Slaby <jirislaby@gmail.com> wrote:

> > This could all be done in userspace, couldn't it? Write a little library
> > which clones a thread then waits for someone to send it a
> > change-your-rlimits message. Write a little tool to send those
> > messages and voila.
>
> Sorry, I'm not sure I understand this. Could you shed some light on what
> will run in the new thread?
>
> A code such as:
> main()
> {
> if (!clone())
> exec("something");
>
> while (wait_for_message(&m)) {
> setrlimit(m);
> sleep();
> }
> }
> won't obviously work. Could you change it so it reflects your idea or
> explain what I'm missing?

main()
{
if (clone(...)) {
while (wait_for_message(&m))
setrlimit(m);
}

...
}

?


\
 
 \ /
  Last update: 2010-05-26 16:33    [W:0.059 / U:12.176 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site