Skip to content

Commit

Permalink
installer: prevent ETXTBSY errors
Browse files Browse the repository at this point in the history
The installer does what amounts to `cp -p`. If the node binary is in use at
the time of the copy, it'd fail with a ETXTBSY error. That's why it's unlinked
first now.
  • Loading branch information
bnoordhuis committed Aug 4, 2012
1 parent b21c8e0 commit 110e499
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def try_copy(path, dst):
source_path, target_path = mkpaths(path, dst)
print 'installing %s' % target_path
try_mkdir_r(os.path.dirname(target_path))
try_unlink(target_path) # prevent ETXTBSY errors
return shutil.copy2(source_path, target_path)

def try_remove(path, dst):
Expand Down

0 comments on commit 110e499

Please sign in to comment.