On 2023-11-16 00:03, Martin Wege wrote:
On Wed, Nov 15, 2023 at 6:05 PM Andrey Repin wrote:
The Cygwin installer "setup-x86_64.exe" has problems updating cygwin1.dll when 
cygserver is running:

You should stop ALL Cygwin processes before starting setup.exe.
This is documented.

This is not helpful. Cygwin setup-x86-64.exe not being able to update,
because SOMETHING is locking cygwin1.dll is in the top 50 of your IT
support, right followed by the question of IT support whether
"updating to WSL" will solve the situation for them permanently.


---- snip ----
Unable to extract /usr/bin/cygwin1.dll -- error writing file
---- snip ----

The fix is to do a $ sc stop cygserver # as Administrator, then
"setup-x86_64.exe" can write to that file, and after "setup" is done do a $ sc 
start cygserverr # as Admin again.

... is it possible to modify "setup-x86_64.exe" to stop cygserver before
doing the installation process and re-start it after it ?

There's no reason to do so, as there's no easy way to detect beforehand, if
you actually need to do so.

sc query cygserver is EASY to detect.

IMO Cygwin needs a serious effort towards
user-friendliness-by-default. Right now Cygwin is a specialist
environment which requires half an university degree to get it
working, and that makes me unhappy because your work is GREAT


You could have cygserver running from one Cygwin setup but installing to the
different one. And so on.

Seriously, who has TWO Cygwin setups on one machine? Also, sc query
can handle those cases too.

There may be critical or just really long Cygwin processes running that should not be killed because somebody wants to upgrade.

Shutting down processes, including services, has to be left to the users or sys admins who understand whether the circumstances are suitable to kill processes to do an upgrade.

I have a privileged Scheduled Task to run to clean up known background processes and shut down Cygwin services, then I check in TaskMgr if anything is still running from that Cygwin root path, before I run my Cygwin Setup script, which does more checking and shut downs of X servers and clients, and checking and reporting on processes from that Cygwin root running in background or Scheduled Tasks, before it will launch the latest downloaded Cygwin Setup in semi-attended -M, --package-manager mode, to give me time to resolve any remaining issues before telling Cygwin Setup to proceed.

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                -- Antoine de Saint-Exupéry

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

Reply via email to