From 110e499fe7dc65429a2fade29fe1573c35d97059 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 4 Aug 2012 02:41:32 +0200 Subject: [PATCH] installer: prevent ETXTBSY errors 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. --- tools/install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/install.py b/tools/install.py index 85e8bc01d06..d03aae9d1c8 100755 --- a/tools/install.py +++ b/tools/install.py @@ -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):