[erlang-questions] os:cmd/1 does not work for ulimit -n

Bengt Kleberg bengt.kleberg@REDACTED
Thu May 14 11:36:57 CEST 2009


Greetings,

The ulimit is set per OS process.

You want to change the ulimit for the process that is hosting the Erlang
emulator.

The os:cmd/1 will give you a another, new, OS process for each call. To
see this, try os:cmd("echo $$").



bengt

On Thu, 2009-05-14 at 14:37 +0530, 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.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list