Erlang - processes



Returns a list of process identifiers corresponding to all the processes currently existing on the local node.

Syntax

processes()

Parameters

  • None

Return Value

Returns a list of process identifiers corresponding to all the processes currently existing on the local node.

For example

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[erlang:processes()]).

Output

When we run the above program we will get the following result. Depending on the system, the output will differ.

[<0.0.0>,<0.2.0>,<0.3.0>,<0.6.0>,<0.7.0>,<0.9.0>,<0.10.0>,<0.11.0>,<0.12.0>,
<0.13.0>,<0.14.0>,<0.15.0>,<0.16.0>,<0.18.0>,<0.19.0>,<0.20.0>,<0.21.0>,
<0.22.0>,<0.23.0>,<0.24.0>,<0.25.0>,<0.26.0>]
erlang_bifs.htm
Advertisements