is there any way to set resource limits in ruby? I am starting a
program (popen) that should not create files > 1 MB, so I think that
the linux/unix syscall setrlimit would be the best way for that.
Sure I can write an sh-wrapper or c-wrapper around the ruby process,
but I'd like to avoid that. But I haven't found any kernel#ulimit or
alike methods in ruby.
is there any way to set resource limits in ruby? I am starting a
program (popen) that should not create files > 1 MB, so I think that
the linux/unix syscall setrlimit would be the best way for that.
Sure I can write an sh-wrapper or c-wrapper around the ruby process,
but I'd like to avoid that. But I haven't found any kernel#ulimit or
alike methods in ruby.
You could write an extension in C that calls the setrlimit function.
Have a look at pickaxe and the section named "Extending Ruby".
On Jul 29, 2004, at 8:06 AM, Patrick Gundlach wrote:
Dear ruby-hackers,
is there any way to set resource limits in ruby? I am starting a
program (popen) that should not create files > 1 MB, so I think that
the linux/unix syscall setrlimit would be the best way for that.
Sure I can write an sh-wrapper or c-wrapper around the ruby process,
but I'd like to avoid that. But I haven't found any kernel#ulimit or
alike methods in ruby.
Here is the link to rlimit_1_0. Thankfully I was able
to find guy 6 months ago and asked him for the backup
files. --David
···
--- David Ross <drossruby@yahoo.com> wrote:
Oh shoot me for not reading all the emails. I will
get
the link to rlimits for you. It is a good library.
--David Ross
--- Patrick Gundlach
<clr3.10.randomuser@spamgourmet.com> wrote:
> Hello Kent,
>
> Kent Sibilev <ksibilev@bellsouth.net> writes:
>
> > Check out http://raa.ruby-lang.org/project/rlimit/
>
> rlimit as well as the other project mentioned
there
> (library/resource) is gone.
>
> But thanks for the pointer, I should look at raa
> more often.
>
> Patrick
>
>