Help save net neutrality! Learn more.
Close

#62 ZODB: Strange interference with os.popen

open
nobody
None
5
2005-02-07
2005-02-07
kxroberto
No

If I open a db/conn/storage, then make a os.popen to
completely unrelated dos-command, then try to close the
conn/db I get a strange lock permission:

----
z_conn=...

cmd=r'C:\bin\gnuplot\pgnuplot.exe'
g = os.popen(cmd, 'w')
global glob_file
glob_file=g
#glob_file=open('chart.txt')
#g.write('set data style linespoints'+'\n')
#g.flush()

z_conn.close()
z_db.close()
-----
File "C:\devel\PythonPlus\zdb.py", line 46, in close
self.db.close()
File "C:\PYTHON23\Lib\site-packages\ZODB\DB.py", line
321, in close
self._storage.close()
File
"C:\PYTHON23\Lib\site-packages\ZODB\FileStorage\FileStorage.py",
line 392, in close
self._lock_file.close()
File
"C:\PYTHON23\Lib\site-packages\ZODB\lock_file.py", line
74, in close
os.unlink(self._path)
OSError: [Errno 13] Permission denied:
'C:/devel/StockEX/stock.dbx.lock'
>>>

Discussion


Log in to post a comment.