How to atomically exchange an executable that could be invoked at any time

  Kiến thức lập trình

We have a service on our server that is triggered by a cronjob quite frequently. Now we want to update this application to a new version. How can we do so without risking the application to be in an invalid state, e.g. if I unlink it first (as described here) and then rename the new application to the filename that will be invoked by cron, there’s always the risk that I’m in this “inbetween” state where the old application is unlinked and not visible anymore and the new application is not yet renamed and thus cannot be found by cron.

How do I accomplish this on RHEL and debian linux?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT