title: Processes stuck in loop with PyInstaller-executable
body: <p><strong>Python v3.5, Windows 10</strong></p>
  
  <p>I'm using multiple processes and trying to captures user input. Searching everything I see there are odd things that happen when using <code>input()</code> with multiple processes. After 8 hours+ of trying, nothing I implement worked, I'm positive I am doing it wrong but I can't for the life of me figure it out.</p>
  
  <p>The following is a very stripped down program that demonstrates the issue. Now it works fine when I run this program within PyCharm, but when I use <code>pyinstaller</code> to create a single executable it fails. The program constantly is stuck in a loop asking the user to enter something as shown below:<a href="https://i.stack.imgur.com/PdDVt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PdDVt.png" alt="enter image description here"></a>.</p>
  
  <p>I am pretty sure it has to do with how Windows takes in standard input from things I've read. I've also tried passing the user input variables as <code>Queue()</code> items to the functions but the same issue. I read you should put <code>input()</code> in the main python process so I did that under <code>if __name__ = '__main__':</code></p>
  
  <pre><code>from multiprocessing import Process
  import time
  
  
  def func_1(duration_1):
      while duration_1 &gt;= 0:
          time.sleep(1)
          print('Duration_1: %d %s' % (duration_1, 's'))
          duration_1 -= 1
  
  
  def func_2(duration_2):
      while duration_2 &gt;= 0:
          time.sleep(1)
          print('Duration_2: %d %s' % (duration_2, 's'))
          duration_2 -= 1
  
  
  if __name__ == '__main__':
  
      # func_1 user input
      while True:
          duration_1 = input('Enter a positive integer.')
          if duration_1.isdigit():
              duration_1 = int(duration_1)
              break
          else:
              print('**Only positive integers accepted**')
              continue
  
      # func_2 user input
      while True:
          duration_2 = input('Enter a positive integer.')
          if duration_2.isdigit():
              duration_2 = int(duration_2)
              break
          else:
              print('**Only positive integers accepted**')
              continue
  
      p1 = Process(target=func_1, args=(duration_1,))
      p2 = Process(target=func_2, args=(duration_2,))
      p1.start()
      p2.start()
      p1.join()
      p2.join()
  </code></pre>