Restore state on supervisor restart

という ML の質問に対して、下記の返信がった。

The supervisor will always start the child with the same arguments, for better or for worse. A common trick is to create an ets table in the supervisor (e.g. in the supervisor init() callback, or in the child start function before spawning the process, taking care not to try to create it more than once.) This way, your server can store data in the ets table that  survives a process crash (but not an escalate restart.) Using a mnesia ram_copy table is also possible.

あー、なるほどね。後でコード書いてみるか。
こう言うのってモジュール化して一般化した方が良いよね?