diff options
author | Lukas Larsson <[email protected]> | 2015-12-15 10:10:10 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2015-12-15 10:21:40 +0100 |
commit | 9083bc7e2172937296b7e8fbe09ed595c6893f08 (patch) | |
tree | b3b4255af12bf6cc023ee7a47bcf5ae5ae115077 /erts/preloaded/src/erlang.erl | |
parent | d7cd5ee8a34d289fbc91627a3f096a870bf70393 (diff) | |
parent | 4b1b3bf6c62f8208b2eea506c9dac1504df6e916 (diff) | |
download | otp-9083bc7e2172937296b7e8fbe09ed595c6893f08.tar.gz otp-9083bc7e2172937296b7e8fbe09ed595c6893f08.tar.bz2 otp-9083bc7e2172937296b7e8fbe09ed595c6893f08.zip |
Merge branch 'lukas/erts/forker'
* lukas/erts/forker: (28 commits)
erts: Never abort in the forked child
erts: Mend ASSERT makro for erl_child_setup
erts: Allow enomem failures in port_SUITE
erts: iter_port sleep longer on freebsd
erts: Allow one dangling fd if there is a gethost port
erts: Only use forker StackAck on freebsd
erts: It is not possible to exit the forker driver
erts: Add forker StartAck for port start flowcontrol
erts: Fix large open_port arg segfault for win32
erts: Fix memory leak at async open port
kernel: Remove cmd server for unix os:cmd
erts: Add testcase for huge port environment
erts: Move os_pid to port hash to child setup
erts: Handle all EINTR and EAGAIN cases in child setup
erts: Make child_setup work with large environments
erts: Fix forker driver ifdefs for win32
erts: Fix uds socket handling for os x
erts: Fix dereferencing of unaligned integer for sparc
erts: Flatten too long io vectors in uds write
erts: Add fd count test for spawn_driver
...
Conflicts:
erts/emulator/beam/erl_node_tables.c
erts/preloaded/src/erts_internal.erl
Diffstat (limited to 'erts/preloaded/src/erlang.erl')
-rw-r--r-- | erts/preloaded/src/erlang.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index 8ebb92d5b2..9517acd78e 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -2034,8 +2034,14 @@ nodes(_Arg) -> | eof | {parallelism, Boolean :: boolean()} | hide. -open_port(_PortName,_PortSettings) -> - erlang:nif_error(undefined). +open_port(PortName, PortSettings) -> + case case erts_internal:open_port(PortName, PortSettings) of + Ref when erlang:is_reference(Ref) -> receive {Ref, Res} -> Res end; + Res -> Res + end of + Port when erlang:is_port(Port) -> Port; + Error -> erlang:error(Error, [PortName, PortSettings]) + end. -type priority_level() :: low | normal | high | max. |