title: Monitors in Erlang/OTP
body: <p>I have a question about monitors.</p>
  
  <pre><code>1&gt; Pid=spawn(fun() -&gt; timer:sleep(500000) end).
  2&gt; exit(Pid, kill).
  3&gt; Ref=erlang:monitor(process, Pid).
  
  4&gt; flush().
  </code></pre>
  
  <p>The output of flush() in my shell is <code>{'DOWN',#Ref&lt;0.0.0.159&gt;,process,&lt;0.69.0&gt;,noproc}</code></p>
  
  <p>My question is: if process was killed before creating monitor, how come shell got the <code>'DOWN'</code> message?</p>