def run(self, cmd, shell = False, kill_tree = True, timeout = -1, airodump = False):

    class Alarm(Exception):
      pass
    def alarm_handler(signum, frame):
      raise Alarm
    output = []
    if timeout != -1:
      signal(SIGALRM, alarm_handler) # Time's ticking...
      alarm(timeout)
    if airodump:
      proc = subprocess.Popen(cmd, shell = shell, stderr = subprocess.PIPE)
    else:
      proc = subprocess.Popen(cmd, shell = shell, stdout = subprocess.PIPE)
    try:
      if airodump:
	for line in iter(proc.stderr.readline, ''):
	  output.append(line)
	if timeout != -1:
	  alarm(0)
      else:
	for line in iter(proc.stdout.readline, ''):
	  output.append(line)
	if timeout != -1:
	  alarm(0)
    except Alarm:         # time's out! alarm is raised
      pids = [proc.pid]   # kill the process tree related with the main process.
      if airodump: system('pkill airodump')
      if kill_tree:
	pids.extend(self.get_process_children(proc.pid))
      for pid in pids:
	try:
	  kill(pid, SIGKILL)
	except OSError:
	  pass
      return output
    return output
Helper function that will receive the desired number of requests.
dataset/ETHPy150Open jgilhutton/pyxiewps_WPShack-Python/pyxiewps-EN.py/Engine.run--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/benchmark/scenarios/test/test_rate_measurer.py/RateMeasurerTest.send_requests