title: How to provide extra information to supervisor when restarting a child in erlang OTP?
body: <p>Say I have a supervisor <code>sup</code> supervise some workers, when a worker started, it register itself with some name, like <code>worker_1</code>, <code>worker_2</code>, etc.. When <code>worker_N</code> crashed and get restarted by <code>sup</code>, how to register the newly created process as <code>worker_N</code>, i.e., how to let the name of a worker survive a restart?</p>
  
  <p><a href="https://stackoverflow.com/questions/13562954/how-to-restart-child-with-custom-state-using-erlang-otp-supervisor-behaviour">How to restart child with custom state using Erlang OTP supervisor behaviour?</a> gives no answer, since I only want the name, there maybe a solution.</p>