aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/port_SUITE.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-05-27 13:08:34 +0000
committerErlang/OTP <[email protected]>2010-05-27 13:08:34 +0000
commit02e434b8befb2696adc98f23bcc195e1ae0539c3 (patch)
tree0985aeec63fb4373d13dd01d818b8a27a242d39e /erts/emulator/test/port_SUITE.erl
parent992a8728b74fed3b9191c609f6e0d57efc91ebd3 (diff)
parentcb42b3d86e131f6d3ba883055990bb4164e0d6a6 (diff)
downloadotp-02e434b8befb2696adc98f23bcc195e1ae0539c3.tar.gz
otp-02e434b8befb2696adc98f23bcc195e1ae0539c3.tar.bz2
otp-02e434b8befb2696adc98f23bcc195e1ae0539c3.zip
Merge branch 'se/spawn_drv_win_deadlock' into dev
* se/spawn_drv_win_deadlock: Fix deadlock in spawn driver on windows OTP-8641 se/spawn_drv_win_deadlock Windows: Closing port of program that stalled without reading all data could deadlock scheduler thread.
Diffstat (limited to 'erts/emulator/test/port_SUITE.erl')
-rw-r--r--erts/emulator/test/port_SUITE.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/erts/emulator/test/port_SUITE.erl b/erts/emulator/test/port_SUITE.erl
index eb69bf917b..66aff307a3 100644
--- a/erts/emulator/test/port_SUITE.erl
+++ b/erts/emulator/test/port_SUITE.erl
@@ -88,7 +88,7 @@
otp_3906/1, otp_4389/1, win_massive/1, win_massive_client/1,
mix_up_ports/1, otp_5112/1, otp_5119/1, otp_6224/1,
exit_status_multi_scheduling_block/1, ports/1,
- spawn_driver/1,spawn_executable/1,
+ spawn_driver/1, spawn_executable/1, close_deaf_port/1,
unregister_name/1]).
-export([]).
@@ -113,7 +113,7 @@ all(suite) ->
otp_3906, otp_4389, win_massive, mix_up_ports,
otp_5112, otp_5119,
exit_status_multi_scheduling_block,
- ports, spawn_driver, spawn_executable,
+ ports, spawn_driver, spawn_executable, close_deaf_port,
unregister_name
].
@@ -2293,3 +2293,12 @@ load_driver(Dir, Driver) ->
io:format("~s\n", [erl_ddll:format_error(Error)]),
Res
end.
+
+
+close_deaf_port(doc) -> ["Send data to port program that does not read it, then close port."];
+close_deaf_port(suite) -> [];
+close_deaf_port(Config) when is_list(Config) ->
+ Port = open_port({spawn,"sleep 999999"},[]),
+ erlang:port_command(Port,"Hello, can you hear me!?!?"),
+ port_close(Port),
+ ok.