summaryrefslogtreecommitdiff
path: root/gpsfake.py
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2006-12-05 03:16:44 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2006-12-05 03:16:44 +0000
commitffb2d399f2977e582d3ec76cfb2b97137a3a41dc (patch)
tree638f83086f8c6528672379c2ca75e2409a5d1b58 /gpsfake.py
parent388d4370e6824b03725994c3762a90af29e885c9 (diff)
downloadgpsd-ffb2d399f2977e582d3ec76cfb2b97137a3a41dc.tar.gz
lsof is nasty. fstat is the way to go.
Diffstat (limited to 'gpsfake.py')
-rw-r--r--gpsfake.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsfake.py b/gpsfake.py
index 8d53f1fa..0abce5cf 100644
--- a/gpsfake.py
+++ b/gpsfake.py
@@ -86,7 +86,7 @@ def proc_has_file_open(pid, file):
else:
# Slower, but portable to OpenBSD etc.
(status, output) = \
- commands.getstatusoutput("lsof -f -t -p %d -a %s"%(pid,file))
+ commands.getstatusoutput("fstat -p %d %s"%(pid,file))
return status == 0 and output
def proc_fd_set(pid):
@@ -99,7 +99,7 @@ def proc_fd_set(pid):
else:
# Slower, but portable to OpenBSD etc.
(status, output) = \
- commands.getstatusoutput("lsof -F f -p %d"%pid)
+ commands.getstatusoutput("fstat -p %d"%pid)
if status != 0:
return []
# Extract the f entries