I seem to have a race problem I can't work my head around.

Suppose I have multiple files promises to keep cf client files up to date:

"/var/cfengine/bin/"
        copy_from ....
         classes => ucdefine(
                "cf_upgraded",
                "cffiles_failed"
         );
"/var/cfengine/lib/"
        copy_from ....
         classes => ucdefine(
                "cf_upgraded",
                "cffiles_failed"
         );
"/var/cfengine/include/"
        copy_from ....
         classes => ucdefine(
                "cf_upgraded",
                "cffiles_failed"
         );

These files include Cfengine, Berkeley and PCRE binaries.  I have to kill 
all Cf processes if these files are updated in order to have the new 
binaries running.
         cf_upgraded::
               "cf-monitord" signals => { "kill" },
                  comment => "Kill if files are upgraded";
                "cf-execd"    signals => { "kill" },
                   comment => "Kill if files are upgraded";
               "cf-serverd"  signals => { "kill" },
                    comment => "Kill if files are upgraded";

I think that it is possible that the processes could be killed before all 
three files promises are completed.  Thus I need some logic to say confirm 
all these file promises first before evaluating the processes promise. At 
the same time I want to keep this simple as it is contained in update.cf. 
Suggestions?

Sincerely,
--
Neil Watson
416-673-3465

CONFIDENTIALITY WARNING 
This communication, including any attachments, is for the exclusive use of 
addressee and may contain proprietary and/or confidential information. If you 
are not the intended recipient, any use, copying, disclosure, dissemination or 
distribution is strictly prohibited. If you are not the intended recipient, 
please notify the sender immediately by return e-mail, delete this 
communication and destroy all copies.

AVERTISSEMENT RELATIF À LA CONFIDENTIALITÉ 
Ce message, ainsi que les pièces qui y sont jointes, est destiné à l’usage 
exclusif de la personne à laquelle il s’adresse et peut contenir de 
l’information personnelle ou confidentielle. Si le lecteur de ce message n’en 
est pas le destinataire, nous l’avisons par la présente que toute diffusion, 
distribution, reproduction ou utilisation de son contenu est strictement 
interdite. Veuillez avertir sur-le-champ l’expéditeur par retour de courrier 
électronique et supprimez ce message ainsi que toutes les pièces jointes.
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to