From e2277e240790930563b0833854e7bc6a8338cf5c Mon Sep 17 00:00:00 2001 From: Matthias Lang Date: Thu, 19 Aug 2010 15:12:26 +0200 Subject: 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. --- erts/doc/src/erlang.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 0963904b83..2fbfe6eb74 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3573,6 +3573,10 @@ os_prompt%

Bytes is the total number of bytes written to the port.

+ {os_pid, Integer} + +

Integer is the OS pid of the spawned process (Unix systems only).

+

Failure: badarg if Port is not a local port.

-- cgit v1.2.3 From ce019aeedbe35ad9081ba7c6d0a0ffd1b035c572 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 11 Apr 2012 16:58:31 +0200 Subject: Correct documentation, erl_bif_types and dialyzer tests --- erts/doc/src/erlang.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 2fbfe6eb74..cfc7fff3af 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3573,9 +3573,9 @@ os_prompt%

Bytes is the total number of bytes written to the port.

- {os_pid, Integer} + {os_pid, Integer | undefined} -

Integer is the OS pid of the spawned process (Unix systems only).

+

Integer is the process identifier (or equivalent) of an OS process created with open_port({spawn | spawn_executable, Command}, Options). If the port is not the result of spawning an OS process, the value is undefined.

Failure: badarg if Port is not a local port.

-- cgit v1.2.3