fix race condition in lftp mirroring
authorGuillaume Cottenceau <gcottenc@gmail.com>
Sat, 9 Jan 2010 18:08:49 +0000 (19:08 +0100)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Sat, 9 Jan 2010 18:08:49 +0000 (19:08 +0100)
bin/booh

index 06c4de6..28319ee 100644 (file)
--- a/bin/booh
+++ b/bin/booh
@@ -4364,7 +4364,11 @@ Mirror web-album into remote repository (lftp URL):
 
         b.signal_connect('clicked') {
             Thread.kill(remote_synchronization_thread)
-            Process.kill('SIGTERM', pid)
+            begin
+                Process.kill('SIGTERM', pid)
+            rescue
+                #- race condition (process just died)
+            end
             w.destroy
         }
         w.show_all