title: Broken pipe error with multiprocessing.Queue
body: <p>In python2.7, multiprocessing.Queue throws a broken error when initialized from inside a function. I am providing a minimal example that reproduces the problem.</p>
  
  <pre><code>#!/usr/bin/python
  # -*- coding: utf-8 -*-
  
  import multiprocessing
  
  def main():
      q = multiprocessing.Queue()
      for i in range(10):
          q.put(i)
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>throws the below broken pipe error</p>
  
  <pre><code>Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/queues.py", line 268, in _feed
  send(obj)
  IOError: [Errno 32] Broken pipe
  
  Process finished with exit code 0
  </code></pre>
  
  <p>I am unable to decipher why. It would certainly be strange that we cannot populate Queue objects from inside a function.</p>