Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Should i close application before yum update?
So, if i yum updated, what will the application use?
i mean it will use the old version package or the new version package?
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by sterry0101
Should i close application before yum update?
So, if i yum updated, what will the application use?
i mean it will use the old version package or the new version package?
In answer to your first question, it should not matter given that when you start an application, it is loaded into your system's memory. However, I would wait until your updates have finished downloading and installing before running your applications. This would be mainly for security reasons - there may be security flaws that your updates fix and therefore that would enhance your system's security.
For your second question (If I'm understanding correctly), yum is basically a "frontend" for the rpm package manager, therefore it's actually the rpm package manager that installs/updates the system, so to speak.
I'm not real sure on your last question.
Could you explain clearly what your meaning?
If you know that the update is targeting some particular application that you are now running, then, yes, I would stop running it first. This simply avoids confusion for the application and bother for you.
The linker keeps the connection to the program and shared libraries open,
so a running process will continue with the deleted files (you can see that with lsof). Sure the active parts of the files are in memory, but in case there is sudden access to yet unused parts it will work: more data is read from the deleted file.
Terminating the program will release the files, so the kernel will clear the data - space is freed in the filesystem.
Starting the program again will pick the updated files.
The only problem might be that an old running application spawns a new process - an already updated one - and expects results from the old one, and the result differs. Very unlikely in practice.
it may depend on that package too. You cannot replace a running application (just the files on the disk), so you can safely install a newer version, the running one will remain intact - as long as it won't (re)load anything after that install. But sometimes it will try to load a shared library, reread config files or want to do something very tricky - which may even cause a crash or data corruption. So yes, it depends on the package.
The linker keeps the connection to the program and shared libraries open,
so a running process will continue with the deleted files (you can see that with lsof). Sure the active parts of the files are in memory, but in case there is sudden access to yet unused parts it will work: more data is read from the deleted file.
Terminating the program will release the files, so the kernel will clear the data - space is freed in the filesystem.
Starting the program again will pick the updated files.
The only problem might be that an old running application spawns a new process - an already updated one - and expects results from the old one, and the result differs. Very unlikely in practice.
Quote:
Originally Posted by pan64
it may depend on that package too. You cannot replace a running application (just the files on the disk), so you can safely install a newer version, the running one will remain intact - as long as it won't (re)load anything after that install. But sometimes it will try to load a shared library, reread config files or want to do something very tricky - which may even cause a crash or data corruption. So yes, it depends on the package.
So, to sum up, the application will still use old version package after i yum upgrade all package.
But sometimes, when the application load shared library, it may crash.
When i reboot the server, it will use the new version package.
right?
Quote:
Originally Posted by jsbjsb001
In answer to your first question, it should not matter given that when you start an application, it is loaded into your system's memory. However, I would wait until your updates have finished downloading and installing before running your applications. This would be mainly for security reasons - there may be security flaws that your updates fix and therefore that would enhance your system's security.
For your second question (If I'm understanding correctly), yum is basically a "frontend" for the rpm package manager, therefore it's actually the rpm package manager that installs/updates the system, so to speak.
I'm not real sure on your last question.
Could you explain clearly what your meaning?
What i mean is that if an application use packageA and packageB. And if i yum update packageA, will the application crash or keep running.
If application is running, the application is using new_version packageA or old_version packageA?
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
As pan64 said, it really depends on the application your referring to and if it re-reads files that have or are being updated. I would say in most cases, that is unlikely to happen. I would still recommend you wait until it has finished the updates first, before opening your apps though.
The copy of the app in question, will be the old version, that would be in memory.
If application is running, the application is using new_version packageA or old_version packageA
This not a good question, app does not use package, but files. And the question is: which files will be used. And the answer is: it depends on the app and depends on when it tries to open them (before/during/after installation). Obviously there is no general answer, but as it was already told usually it works, but in some cases it may cause surprises.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.