def subprocess_manager(self, exec_args):
        try:
            self.tcpdump_process = subprocess.Popen(exec_args.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        except __HOLE__:
            raise RuntimeError('Could not run tcpdump executable (either not \
                               installed or not in path): %s' % (exec_args))
        out, err = self.tcpdump_process.communicate()
        if out:
            print 'standard output of subprocess: %s' % out
        if err:
            raise RuntimeError('%s\ntcpdump had output on stderr: %s' % (exec_args, err))
        if self.tcpdump_process.returncode:
            raise RuntimeError('%s\ntcpdump had returncode: %d' % (exec_args, self.tcpdump_process.returncode))
dataset/ETHPy150Open SuperCowPowers/workbench/workbench/utils/pcap_streamer.py/TCPDumpToWorkbench.subprocess_manager