diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2006-12-05 03:16:44 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2006-12-05 03:16:44 +0000 |
commit | ffb2d399f2977e582d3ec76cfb2b97137a3a41dc (patch) | |
tree | 638f83086f8c6528672379c2ca75e2409a5d1b58 /gpsfake.py | |
parent | 388d4370e6824b03725994c3762a90af29e885c9 (diff) | |
download | gpsd-ffb2d399f2977e582d3ec76cfb2b97137a3a41dc.tar.gz |
lsof is nasty. fstat is the way to go.
Diffstat (limited to 'gpsfake.py')
-rw-r--r-- | gpsfake.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |