delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/10/04:32:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AD04A23.5060605@gmail.com>
Date: Sat, 10 Oct 2009 09:47:31 +0100
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Many Cygwin (mintty) windows - How to close all?
References: <hal2jt$vj3$1 AT ger DOT gmane DOT org> <COL102-W1578D201FE6533BCC5000BB5CC0 AT phx DOT gbl> <2bf229d30910081120q384b329fs7e24b560bf721947 AT mail DOT gmail DOT com> <4ACFE190 DOT 7000700 AT biyani DOT org> <83ocof1x98 DOT fsf AT gmail DOT com>
In-Reply-To: <83ocof1x98.fsf@gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019