[erlang-questions] erlang-questions Digest, Vol 24, Issue 48

Thijs Terlouw thijsterlouw@REDACTED
Thu May 14 12:21:21 CEST 2009


You can also use a driver program to set the ulimit from Erlang.
All the hard work has already been done:

http://github.com/cliffmoon/dynomite/commits/master/c/ulimit_drv.c

-- 
Thijs Terlouw,
Shenzhen, China
http://www.startinchina.com


>
> AFAIK, os:cmd/1 will open a port for doing the OS command. This will
> spawn  a new OS process in which you're setting the ulimit. This doesn't
> affect the parent process however. You will need to do this in the shell
> before you start Erlang.
>
> MAthuvathanan Mou. wrote:
> > Hi all,
> >
> > Using Linux (RedHat) I wanted to increase number of open files for that
> > session only (temporarily)
> >
> > In the erl shell I did
> >
> > erl
> > Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [hipe]
> > [kernel-poll:false]
> >
> > Eshell V5.5.5  (abort with ^G)
> > 1> os:cmd('ulimit -n').
> > "1024\n"
> > 2> os:cmd('ulimit -n 2048').
> > []
> > 3> os:cmd('ulimit -n').
> > "1024\n"
> > 4>
> >
> > Why did open file not increase here?
> >
> > Regards,
> >
> > --
> > Mathuvathanan Mou.
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090514/794f7712/attachment.htm>


More information about the erlang-questions mailing list