diff options
author | Erlang/OTP <[email protected]> | 2010-04-29 15:25:27 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-04-29 15:25:27 +0000 |
commit | b328564bfe321c2df597c77fea57566ee8d00f2b (patch) | |
tree | 48d06057fad0819ebdf2811992631e6ae8ebb2c9 /lib/kernel/src/heart.erl | |
parent | c8fbe3f82050477a713b22b5d3b671718588aa79 (diff) | |
parent | 75ea6a39d1cf4bd4a67391595b90d8d90155d012 (diff) | |
download | otp-b328564bfe321c2df597c77fea57566ee8d00f2b.tar.gz otp-b328564bfe321c2df597c77fea57566ee8d00f2b.tar.bz2 otp-b328564bfe321c2df597c77fea57566ee8d00f2b.zip |
Merge branch 'ks/kernel' into dev
* ks/kernel:
kernel: Clean up as suggested by tidier
OTP-8606 ks/kernel
Diffstat (limited to 'lib/kernel/src/heart.erl')
-rw-r--r-- | lib/kernel/src/heart.erl | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/kernel/src/heart.erl b/lib/kernel/src/heart.erl index bad0950fca..e78acfc7a6 100644 --- a/lib/kernel/src/heart.erl +++ b/lib/kernel/src/heart.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% -module(heart). @@ -61,8 +61,8 @@ start() -> wait_for_init_ack(From) -> receive - {ok, From} -> - {ok, From}; + {ok, From} = Ok -> + Ok; {no_heart, From} -> ignore; {Error, From} -> @@ -119,8 +119,7 @@ wait() -> start_portprogram() -> check_start_heart(), - HeartCmd = "heart -pid " ++ os:getpid() ++ " " ++ - get_heart_timeouts(), + HeartCmd = "heart -pid " ++ os:getpid() ++ " " ++ get_heart_timeouts(), try open_port({spawn, HeartCmd}, [{packet, 2}]) of Port when is_port(Port) -> case wait_ack(Port) of @@ -175,7 +174,7 @@ wait_ack(Port) -> loop(Parent, Port, Cmd) -> send_heart_beat(Port), receive - {From, set_cmd, NewCmd} when is_list(NewCmd), length(NewCmd) < 2047 -> + {From, set_cmd, NewCmd} when length(NewCmd) < 2047 -> send_heart_cmd(Port, NewCmd), wait_ack(Port), From ! {heart, ok}, |