This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Updated cygwin dlls cause unnecessary reboot on NT


On Mon, 25 Dec 2006, Linda Walsh wrote:

> Larry Hall (Cygwin) wrote:
> > What the file is named is insignificant.  When the file is already in
> > use, you will run into the situation where the newly installed file is
> > not moved into place for use immediately .
> ---
>    That is current cygwin behavior.  It isn't required to be that way on
> NT.
> > Renaming the old file to something else won't help this situation,
> > since the original is still in use.
> ---
>    It would seem to solve the original poster's problem of the new files
> getting installed with ".new" suffixes and having to reboot to cure the
> problem.
> Any new processes will use the newly installed library -- not the
> original.

And that is exactly the problem -- not the .new suffixes.  The way Cygwin
is designed, you cannot have two versions of the Cygwin DLL (think of it
as the kernel) in use at the same time, no matter what the name is.  In
Linux, you expect to reboot when upgrading the kernel -- why are you
surprised that the same happens in Cygwin?

> [snip]
> The only "caveat" is like the one on Unix: any active processes will
> continue to use the old library until those processes are reloaded.
> That's not usually an issue.

Oh, but it *is* in Cygwin.

> It certainly makes cygwin updates easier to not have to reboot.  It's
> been years since cygwin forced me into a reboot -- I just look at the
> pending moves with pendmoves(sysinternals) and do the move, that
> cygwin doesn't, manually.  I usually move the old libraries to /tmp,
> as it will get cleared out automatically by maintenance
> processes -- even if a reboot doesn't happen.

The easiest way to update Cygwin without rebooting is to stop all Cygwin
processes before updating.  If you want a fallback in case you forget to
stop a process, try the latest setup snapshot, which should have support
for interactively warning the user if files are in-use and letting her
stop the offending processes and continue.

> If you need any more explanation of how to implement this...

I think pretty much everyone knows how to implement this.  The problem
that needs to be solved is how to do this without allowing the user to
have more than 1 version of cygwin1.dll in memory at the same time.

If you can figure this one out, feel free to submit a patch to Cygwin
setup that implements the behavior you suggest.  I don't see why it can't
work for any libraries other than cygwin1.dll (and maybe a couple of
others).  However, I doubt that any patch that special-cases the DLL by
name will be accepted.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]