X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=daemon%2Fwhenjobsd.ml;h=3028503adc4cc0e7e72fa2738812dbfb2b70f5da;hp=1efde6c1faa7c328d82f065e2da00c28590839c6;hb=8582d10e7b131ffbfe1d92352e7df39230ce1124;hpb=083f42734bf06c6a752e3a93e519c6250a04dd96 diff --git a/daemon/whenjobsd.ml b/daemon/whenjobsd.ml index 1efde6c..3028503 100644 --- a/daemon/whenjobsd.ml +++ b/daemon/whenjobsd.ml @@ -126,11 +126,12 @@ Options: Syslog.notice "daemon started: version=%s uid=%d home=%s" Config.package_version euid home; - (* If there is a jobs.cmo file, load it. *) + (* If there is a jobs.cmo/jobs.cmxs file, load it. *) let () = - let file = sprintf "%s/jobs.cmo" jobsdir in + let suffix = if not Dynlink.is_native then "cmo" else "cmxs" in + let file = sprintf "%s/jobs.%s" jobsdir suffix in if Sys.file_exists file then - try Daemon.reload_file () with Failure _ -> () in + try Daemon.reload_files () with Failure _ -> () in (* Go into main loop. *) Daemon.main_loop ()