7

As the title says. If I run yum update(It's a CentOS box) and there happens to be a Python update. What happens if other users have running Python programs. Do I need to alert them to restart the programs? Or can they safely continue to run those programs basically indefinitely if they like?

To ask differently: Is the old Python version kept on the system(hard drive) for as long there is some process still open. Or does the update immediately overwrite the existing Python installation/binary? So existing processes continue to run only because Python interpreter is completely loaded in memory?

3

Yes.

Well, you don't need, as SvW correctly pointed out, but you should. Programs will continue running, but depending on how they're written, there is a theoretical possibility of them trying to load newer, and incompatible packages after the update.

Edit, To answer your "differently asked" question: Yes - open files may be deleted with POSIX, but this effectively just hides it from other processes, until it can be definitely deleted when the open handle gets released. Some C-API information available on SE.SO.

| improve this answer | |
  • I've updated the question with some more, hmm, questions! :) – Ivan Kovacevic Jul 18 '13 at 12:06
  • 1
    And now the answer is a bit more detailed. – Roman Jul 19 '13 at 7:10
4

From a general point of view, updated programs can continue to run as long as you like, but of course fixes in the Python interpreter will not be available before you restart them. Check the change logs to see if this affects you.

| improve this answer | |
  • That is understandable. I just wanted to make sure that the current(old) installation from which those programs have been started does not get unstable. For example if Python dynamically loads or unloads parts/modules of itself. – Ivan Kovacevic Jul 18 '13 at 11:50
  • 1
    If a program dynamically loads modules, there is a chance you will load the newer version after the update. The old version is available if there are open, preexisting file pointers to it in memory, but any new file pointers will go to the newer version. – John Jul 18 '13 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.