title: cannot retrieve process id for global process name
body: <p>I have a worker that is initialised as follows:</p>
  
  <pre><code>defmodule GenServerDB.Worker do                                                                                                                                                                                    
    use GenServer 
  
    def start_link(name) do                                                                                                                                                                                          
      GenServer.start_link(__MODULE__, :ok, [name: {:global, {:name, name}}])                                                                                                                                        
    end
  
    def init(:ok) do
      {:ok, %{}}
    end
  
  end
  </code></pre>
  
  <p>I can then create workers that I expect to be named using the <code>:global</code> module:</p>
  
  <pre><code>iex(3)&gt; {:ok, pid} = Supervisor.start_link([Supervisor.Spec.worker(GenServerDB.Worker, [], [])], strategy: :simple_one_for_one)                                                                                          
  {:ok, #PID&lt;0.126.0&gt;}
  iex(4)&gt; Supervisor.start_child(pid, [[1]])                                                                                                                                                                         
  Supervisor.start_child(pid, [[1]])                                                                                                                                                                                 
  {:ok, #PID&lt;0.128.0&gt;}                                                                                                                                                      
  iex(6)&gt; Supervisor.start_child(pid, [[2]])                                                                                                                                                                         
  Supervisor.start_child(pid, [[2]])                                                                                                                                                                                 
  {:ok, #PID&lt;0.131.0&gt;}                                                                                                                                                                                               
  iex(7)&gt; Supervisor.start_child(pid, [[3]])                                                                                                                                                                         
  Supervisor.start_child(pid, [[3]])                                                                                                                                                                                 
  {:ok, #PID&lt;0.133.0&gt;}
  iex(8)&gt; Supervisor.which_children(pid)                                                                                                                                                                             
  Supervisor.which_children(pid)                                                                                                                                                                                     
  [{:undefined, #PID&lt;0.128.0&gt;, :worker, [GenServerDB.Worker]},                                                                                                                                                       
   {:undefined, #PID&lt;0.131.0&gt;, :worker, [GenServerDB.Worker]},                                                                                                                                                       
   {:undefined, #PID&lt;0.133.0&gt;, :worker, [GenServerDB.Worker]}] 
  </code></pre>
  
  <p>However when I try and get the <code>pid</code> for a given <code>name</code>, I get the following:</p>
  
  <pre><code>iex(9)&gt; :global.whereis_name({:global, {:name, 1}})                                                                                                                                                                
  :global.whereis_name({:global, {:name, 1}})                                                                                                                                                                        
  :undefined
  </code></pre>
  
  <p>Am I missing something here? It looks like I haven't named the process properly.</p>