From: Claudio Sacerdoti Coen Date: Fri, 1 Dec 2000 20:00:19 +0000 (+0000) Subject: during update, asks the perl getter to update too X-Git-Tag: nogzip~114 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=6a0c95aa83419769d65137e24edf3468f94993c9;p=helm.git during update, asks the perl getter to update too --- diff --git a/helm/interface/getter.ml b/helm/interface/getter.ml index 39af104cc..d79409c89 100644 --- a/helm/interface/getter.ml +++ b/helm/interface/getter.ml @@ -56,6 +56,8 @@ let rec mk_urls_of_uris = uris map ;; +exception PerlGetterNotResponding;; + let update () = let module C = Configuration in let fd = open_in C.servers_file in @@ -72,7 +74,11 @@ let update () = Dbm.opendbm C.uris_dbm [Dbm.Dbm_wronly ; Dbm.Dbm_create] 0o660 in MapOfStrings.iter (fun uri url -> Dbm.add dbm uri url) urls_of_uris ; - Dbm.close dbm + Dbm.close dbm ; + (* Inform also the Perl-getter *) + if Sys.command ("wget -O /dev/null http://localhost:8081/update") <> 0 + then + raise PerlGetterNotResponding ; ;; (* url_of_uri : uri -> url *)