setup.exe sucks

Brian Dessent
Fri Dec 10 00:30:00 GMT 2004

Warren Young wrote:

> Warren Young wrote:
> > stop running services before starting the upgrade.
> Thinking more about it, couldn't you just call LoadLibrary() on the full
> path to cygwin.dll, and if that succeeds, get the process list from it
> and send out kill signals?
> If LoadLibrary() doesn't succeed, either Cygwin isn't installed, or the
> DLL has gone missing; in either case, you can probably upgrade without a
> reboot anyway.

The Cygwin DLL cannot be dynamically loaded AFAIK so that won't work.

If you really wanted to do this, I can see two clean ways of doing it:

1. Query the service manager and enumerate all the services that have
cygrunsrv.exe as their target.  Stop the ones that are running (with
user confirmation perhaps) and then restart whatever you stopped after

2. Add machinery to cygrunsrv so that there's a way to query all running
cygwin services -- IPC, unix socket, named pipes, whatever.


More information about the Cygwin-apps mailing list