[erlang-questions] How to get pid number in NIF code?

Tony Rogvall tony@REDACTED
Wed Sep 28 10:48:07 CEST 2011


I do not think there is a way to extract that number (except for a small hack, of course)

Care to tell the reason behind why you need it ?

/Tony



On 28 sep 2011, at 09:53, Jovi Zhang wrote:

> On Wed, Sep 28, 2011 at 3:31 PM, Anthony Ramine <nox@REDACTED> wrote:
>> Are you looking for enif_self() [1]?
>> 
>> Regards,
>> 
>> [1] http://www.erlang.org/doc/man/erl_nif.html#enif_self
> 
> enif_self only return ErlNifPid, but I want to get pid number.
> like pid is <0.32.0>, what I want to get is 32, is there any way to
> get number? Thanks!
> 
> ErlNifPid* enif_self(ErlNifEnv* caller_env, ErlNifPid* pid)
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

"Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110928/5a9beefa/attachment.htm>


More information about the erlang-questions mailing list