English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
これはis_process_alive(Pid)。Pid 必须引用本地节点上的进程。如果进程存在并且处于活动状态,则返回 true,也就是说,无论进程是否退出或者没有退出。否则,返回 false。
文法
引数 processid
返却値
-module(helloworld). -export([start/0, call/2]). call(Arg1, Arg2]) -> io:format("~p ~p~n", [Arg1, Arg2]). start() -> Pid = spawn(?MODULE, call, ["hello", "process"]), io:fwrite("~p~n",[is_process_alive(Pid)]).
上記のプログラムを実行すると、以下のような結果が得られます。
true "hello" "process"