aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl
diff options
context:
space:
mode:
authorMatthias Lang <[email protected]>2010-08-19 15:12:26 +0200
committerBjörn-Egil Dahlberg <[email protected]>2012-03-16 15:46:50 +0100
commitd4667d383964c1550e0a91d64b674e84f6d07e3b (patch)
tree68b0ff1251df66b2e211951ff8748d1ee72c0998 /lib/hipe/cerl
parent8406f47252a5f1fd38cd771aa7fa692817677709 (diff)
downloadotp-d4667d383964c1550e0a91d64b674e84f6d07e3b.tar.gz
otp-d4667d383964c1550e0a91d64b674e84f6d07e3b.tar.bz2
otp-d4667d383964c1550e0a91d64b674e84f6d07e3b.zip
Extend erlang:port_info/1,2 to show the OS pid of a spawned process
When spawning OS (unix) processes with erlang:open_port, store the resulting unix pid so that it can be queried later on using erlang:port_info/1,2.
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r--lib/hipe/cerl/erl_bif_types.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl
index 3d1e3e8137..7ddbf56dd4 100644
--- a/lib/hipe/cerl/erl_bif_types.erl
+++ b/lib/hipe/cerl/erl_bif_types.erl
@@ -780,6 +780,7 @@ type(erlang, port_info, 2, Xs) ->
['input'] -> t_tuple([Item, t_integer()]);
['links'] -> t_tuple([Item, t_list(t_pid())]);
['name'] -> t_tuple([Item, t_string()]);
+ ['os_pid'] -> t_tuple([Item, t_integer()]);
['output'] -> t_tuple([Item, t_integer()]);
['registered_name'] -> t_tuple([Item, t_atom()]);
List when is_list(List) ->
@@ -2282,7 +2283,7 @@ arg_types(erlang, port_info, 1) ->
arg_types(erlang, port_info, 2) ->
[t_sup(t_port(), t_atom()),
t_atoms(['registered_name', 'id', 'connected',
- 'links', 'name', 'input', 'output'])];
+ 'links', 'name', 'input', 'output', 'os_pid'])];
%% Guard bif, needs to be here.
arg_types(erlang, round, 1) ->
[t_number()];