Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
e6826689
Commit
e6826689
authored
Mar 04, 2013
by
scoder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #188 from pv/pyxbuild-fixes
pyximport: fix a bug crashing other processes
parents
7845d15b
e2f2580a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
pyximport/pyxbuild.py
pyximport/pyxbuild.py
+11
-0
No files found.
pyximport/pyxbuild.py
View file @
e6826689
...
...
@@ -124,6 +124,17 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
basename
+
'.reload%s'
%
count
)
try
:
import
shutil
# late import / reload_support is: debugging
try
:
# Try to unlink first --- if the .so file
# is mmapped by another process,
# overwriting its contents corrupts the
# loaded image (on Linux) and crashes the
# other process. On Windows, unlinking an
# open file just fails.
if
os
.
path
.
isfile
(
r_path
):
os
.
unlink
(
r_path
)
except
OSError
:
continue
shutil
.
copy2
(
org_path
,
r_path
)
so_path
=
r_path
except
IOError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment