[erlang-questions] where is os:getuid() ?
Jesper Louis Andersen
Mon Nov 23 20:09:54 CET 2015
On Mon, Nov 23, 2015 at 7:02 PM, derek <denc716@REDACTED> wrote:
> wonder how many other POSIX system calls are not implemented in erlang
> standard library
Many! Most calls implemented is there due to a need by someone. This is why
some of the system calls, however likely to be used, has not yet been
implemented. Erlang doesn't in general provide a POSIX interface to the
underlying Operating System, and many parts doesn't map well into the
All hope is not lost however, since
list_to_integer(string:strip(os:cmd("id -u"), right, $\n)).
solves your problem. Granted, it performs worse than asking for the uid
directly, but I've rarely seen a program who needed to manipulate uids
otherwise, written in Erlang. May I ask what you are trying to do?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions