title: Python subprocess gets stuck by a child process
body: <p>I am trying to call a subprocess inside a subprocess in order to send information using ZMQ to an Unity Application. When I call <code>socket.recv()</code> or <code>time.sleep</code>, it stucks the parent process(which is a child process of a main process)</p>
  
  <pre><code>import json
  import zmq
  from multiprocessing import Process
  import multiprocessing as mp
  from absl import app, flags, logging
  from absl.flags import FLAGS
  
  def send_unity_data(arg):
      context = zmq.Context()
      socket = context.socket(zmq.ROUTER)
      socket.bind("tcp://*:8080")
      while True:
          if(arg.poll()):
              message=arg.recv()
              x =  { "x":str(message[0]), "y":str(message[1])}
              app_json = json.dumps(x)
              socket.send_string(app_json)
              message = socket.recv()
              print("Received request: %s" % message)
  
  def streaming(detection,args):
      try:
          vid = cv2.VideoCapture(int(FLAGS.video))
      except:
          vid = cv2.VideoCapture(FLAGS.video)
      receiver1 , sender1 = mp.Pipe()
      b_proc3 = Process(target=send_unity_data, args=[receiver1])
      b_proc3.start()
      while(True):
      ...
  
  def Main(_argv):
      receiver , sender = mp.Pipe()
      b_proc = Process(target=streaming, args=[receiver,FLAGS])
      b_proc.start()
      while(True):
      ...
  </code></pre>
  
  <p>I want to send positional coordinates to an Unity application, which is calculated by the streaming process, if someone has a better way to do it, I can change my code as well.</p>