aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2012-10-11 15:16:08 +0200
committerBjörn-Egil Dahlberg <[email protected]>2012-10-15 20:49:44 +0200
commit310354406aecba66ac0acbfd7d8ed8abb8bfcd5d (patch)
treec517627db9efb5c02f232454700d3b7654fa6fe1 /erts
parent70c9312c4bd8832c31094dd076364077f0a684c5 (diff)
downloadotp-310354406aecba66ac0acbfd7d8ed8abb8bfcd5d.tar.gz
otp-310354406aecba66ac0acbfd7d8ed8abb8bfcd5d.tar.bz2
otp-310354406aecba66ac0acbfd7d8ed8abb8bfcd5d.zip
erts: Search for heart in ports that are alive
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/io.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 502ded4eca..88e9215a9c 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -5248,7 +5248,10 @@ Port *erts_get_heart_port() {
for(ix = 0; ix < erts_max_ports; ix++) {
port = &erts_port[ix];
- /* immediate compare */
+ /* only examine undead or alive ports */
+ if (port->status & ERTS_PORT_SFLGS_DEAD)
+ continue;
+ /* immediate atom compare */
if (port->reg && port->reg->name == am_heart_port) {
return port;
}