LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-15-2018, 03:58 AM   #1
sterry0101
LQ Newbie
 
Registered: Jan 2018
Posts: 11

Rep: Reputation: Disabled
Should i close application before yum update?


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?
 
Old 01-15-2018, 05:25 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by sterry0101 View Post
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?
 
Old 01-15-2018, 09:01 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,755
Blog Entries: 4

Rep: Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966
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.
 
Old 01-15-2018, 09:04 AM   #4
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,874

Rep: Reputation: 1227Reputation: 1227Reputation: 1227Reputation: 1227Reputation: 1227Reputation: 1227Reputation: 1227Reputation: 1227Reputation: 1227
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.
 
1 members found this post helpful.
Old 01-15-2018, 11:24 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,258

Rep: Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419
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.
 
1 members found this post helpful.
Old 01-15-2018, 02:40 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I just reboot after an upgrade. Then everything is 'for sure' taken care of.
 
Old 01-15-2018, 10:25 PM   #7
sterry0101
LQ Newbie
 
Registered: Jan 2018
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MadeInGermany View Post
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 View Post
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 View Post
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?
 
Old 01-15-2018, 11:43 PM   #8
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
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.

Last edited by jsbjsb001; 01-15-2018 at 11:55 PM.
 
Old 01-16-2018, 12:37 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,258

Rep: Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419
Quote:
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
after yum update, can't yum update yet, some error occured novelbean Linux - Newbie 5 04-03-2013 08:13 PM
fedora 12 `yum update -y` & ran out of space in my /var/yum/cache/directory. techknowtarded Linux - Newbie 7 08-13-2011 07:23 PM
how to update rhel 5 using centos yum updater without conflict with yum redhat plugin udayvikram Linux - Software 2 03-30-2010 08:15 AM
how to update rhel 5 using centos yum updater without conflict with yum redhat plugin udayvikram Linux - Newbie 1 03-29-2010 12:56 PM
Forcing close a application that is not responding Jim28 Linux - Software 3 09-24-2006 11:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration