title: How to run Elixir Supervisor in escript
body: <p>I have a mix project with as simple as possible a Supervisor and GenServer.  When I call from iex:</p>
  
  <pre><code>EchoCmd.Supervisor.start_link([:Hello])
  GenServer.call(:echoserver, :echo)
  GenServer.call(:echoserver, :mumble)
  GenServer.call(:echoserver, :echo)
  </code></pre>
  
  <p>The :mumble call raises an exception, then the GenServer is restarted and the second :echo call works ok.</p>
  
  <p>If I run the code in any other way the Supervisor fails to restart the GenServer.  For example, I create an escript of the project with the main module as follows:</p>
  
  <pre><code>defmodule EchoCmd.Echo do
      def main(args) do
          EchoCmd.Supervisor.start_link([:Hello])
          GenServer.call(:echoserver, :echo)
          GenServer.call(:echoserver, :mumble)
          GenServer.call(:echoserver, :echo)
      end
  end
  </code></pre>
  
  <p>The :mumble call raises an exception and the escript terminates without the Supervisor restarting the GenServer.</p>
  
  <p>I've not included the Supervisor and Server modules code because they work fine when called from iex, so I'm guessing they're not needed here.</p>
  
  <p>Do I have a conceptual misunderstanding?  Is this not possible, or am I doing something wrong?</p>