You can also use a driver program to set the ulimit from Erlang.<br>All the hard work has already been done:<br><br><a href="http://github.com/cliffmoon/dynomite/commits/master/c/ulimit_drv.c">http://github.com/cliffmoon/dynomite/commits/master/c/ulimit_drv.c</a><br>

<br>-- <br>Thijs Terlouw,<br>Shenzhen, China<br><a href="http://www.startinchina.com">http://www.startinchina.com</a><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

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