Hmm, I should have posted this to a C mailing list, as it's extremely
off topic for Django.

I'll move this discussion to a different list.. but here's what I've
found so far (for anyone interested).

Within C code, setting 'rlim_max' allows you to set a floor limit for
a process (http://linux.die.net/man/2/setrlimit). However, I am yet to
find out if this limit is inherited after spawning/forking.


On Fri, Jul 8, 2011 at 2:43 PM, Cal Leeming [Simplicity Media Ltd]
<[email protected]> wrote:
> Thank you for taking the time to reply though!
>
> On Fri, Jul 8, 2011 at 2:33 PM, Tom Evans <[email protected]> wrote:
>> On Fri, Jul 8, 2011 at 2:23 PM, Cal Leeming [Simplicity Media Ltd]
>> <[email protected]> wrote:
>>> Hi Roberto,
>>>
>>> Wonder if you might be able to give me some advice..
>>>
>>> Is there is a way to limit the address space of any other binary,
>>> without relying on /etc/security/limits.conf??
>>>
>>> For example, is it possible to do something like this:
>>>
>>> ./magic-here --limit-as=256M -- /usr/sbin/some-legacy-binary-here
>>>
>>> ^^ that would then wrap the binary, enforcing a maximum address space of 
>>> 256M.
>>>
>>> As you gave the option --limit-as to uwsgi, which can apply to any
>>> python webapp, I was wondering if it's possible for us to do the same,
>>> but without compiling the original binary into uwsgi.
>>>
>>> Let me know if the above doesn't make any sense lol.
>>>
>>> Cal
>>>
>>
>> ulimit -a
>>
>> Eg: ulimit -s 4096
>>
>> Cheers
>>
>> Tom
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to