常駐したプロセスを停止する際は、exit(normal) を使った方が、お行儀が良い?
Supervisor の停止を下記の通り書いていたら・・・
stop() -> case whereis(?MODULE) of Pid when pid(Pid) -> exit(Pid, shutdown), ok; _ -> not_started end.
Common Test で怒られてしまった。
Application の stop は怒られないなーと思い source を追ってみたら exit(normal) してたので、下記のように書き換えてみた。
stop() -> case whereis(?MODULE) of Pid when pid(Pid) -> exit(Pid, normal), ok; _ -> not_started end.
これで怒られなくなった。