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 06c4de64d6955d7bfa5ca7543bc0db58a53b22ad..28319ee21a65a707ddd84826fd57c2b6219444ce 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