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: Many Cygwin (mintty) windows - How to close all?


Haojun Bao wrote:

> The C# .net programming ...

  Yeh.  Or you could just use the cygwin native tools from the procps package,
which have the advantage of not having to install hundreds of megabytes of MS
bloatware.

> The C# .net programming provides a `System.Diagnostics' package, which
> you can use to enum every process and every PE32 executable (dll or exe)
> loaded by each process, then you just grep "cygwin1.dll" and
> TerminateProcess each of them. Put it in a python script...

  How on earth is that not *hugely* more trouble and effort than just typing
"kill -9 -1"?

> Another thing, when running `terminateModule.py', the python must be the
> native win32 python, with pywin32 installed, not the one shipped with
> cygwin. The reason should be apparent. Then there comes another problem,

  First you have a problem.  Then you decided to use a non-cygwin version of
something that is also a cygwin app to help you.  Now you have two problems!
This entire design is pointlessly baroque.

> the pywinstart.exe is a *general* .exe file, which will only invoke bash
> with a `helper.sh' and the command line arguments, in helper.sh, it will
> see pywinstart.exe is executing, so instead it will invoke a
> *pywinstart.sh*, which then *cygstart* the native python, with the .py
> file path "~/bin/windows/terminateModule.py" transformed to it's win32
> path using `cygpath -alm'

  Are you being deliberately masochistic?  Why not do it all blindfold as well
just to make things even harder on yourself?  Installing the .NET runtime, and
a whole new python distro, and a bunch of scripts, and all this just to
duplicate the existing functionality that "pkill" and "pgrep" provide in a
fraction of the size and hassle?  *shrugs* It's your life to waste, I guess.

> Be fore-warned: it will change your keyboard's CapsLock into Control,
> among other not very polite things:-)

  So apart from being far more trouble, taking far more time and effort, and
disk space, and cpu cycles, and being fragile, it ALSO has the additionl
benefit of messing up your settings?

  Cost-benefit trade-off.  You are doing it wrong.

    cheers,
      DaveK


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


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