From df344eed5c1ff1c6e884c4099688810a0038ddb8 Mon Sep 17 00:00:00 2001
From: Dirk Loss <mail@dirk-loss.de>
Date: Mon, 20 Jul 2009 18:38:53 +0200
Subject: [PATCH] Replaced os.spawnlp() with portable calls to 'subprocess'
 module

---
 scapy/utils.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scapy/utils.py b/scapy/utils.py
index 56eb2aa5..006a6d6f 100644
--- a/scapy/utils.py
+++ b/scapy/utils.py
@@ -7,6 +7,7 @@ import os,sys,socket,types
 import random,time
 import gzip,zlib,cPickle
 import re,struct,array
+import subprocess
 
 import warnings
 warnings.filterwarnings("ignore","tempnam",RuntimeWarning, __name__)
@@ -692,14 +693,14 @@ def wireshark(pktlist):
     """Run wireshark on a list of packets"""
     f = get_temp_file()
     wrpcap(f, pktlist)
-    os.spawnlp(os.P_NOWAIT, conf.prog.wireshark, conf.prog.wireshark, "-r", f)
+    subprocess.Popen([conf.prog.wireshark, "-r", f])
 
 @conf.commands.register
 def hexedit(x):
     x = str(x)
     f = get_temp_file()
     open(f,"w").write(x)
-    os.spawnlp(os.P_WAIT, conf.prog.hexedit, conf.prog.hexedit, f)
+    subprocess.call([conf.prog.hexedit, f])
     x = open(f).read()
     os.unlink(f)
     return x
-- 
GitLab