This is the mail archive of the cygwin-apps@cygwin.com 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: setup.exe sucks


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
installing.

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

Brian


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