Messages in this thread | | | Date | Wed, 26 May 2010 07:30:45 -0700 | From | Andrew Morton <> | Subject | Re: [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); }
... } ?
| |