delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/12/18/14:04:38

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=BwUm9WHrqQGUz4C7S17wpCy2A+daRZHB/fubRjU5M5CWYbNT4OnWp
08DKCJB3NiVLTeFAsc7ZTMRw9bSZiS1+aDUjVBIFiTOlmSh5pb4RXS8ngiBzGWA9
DDeFseIqxCj2s/EVnLEkKFHXbkvDPPXrLH6HVcKUhMsAgeIcyyJqqc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=e7/2j7DC9mT9I9ikL53LQnv9aG4=; b=Cz0xymba4ZQ/bH03WsyW0Apub9kB
ByleIfQJaJ1osLXfgQszZgc++zPLzk1W1L6XDr1MAUcecE8dRXeDBN7vhxPlvrhz
MLPNU5JVWbQ3PxOQJydsJBUE7xfpZWsjYpRchOVGcH8gFO2iF6OezrSZQwkZsADR
1tNOrew/Q8fUBCI=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Thu, 18 Dec 2014 20:04:17 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ps questions
Message-ID: <20141218190417.GK10824@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAO2ddnZChb-n9+Z1YEWCFSA=WTaYfkmHdjMZk7Te5JYckUDE+Q AT mail DOT gmail DOT com> <5492EDFC DOT 5080608 AT gmail DOT com> <CAO2ddnZHs=4GxUJtjgoyTXO2Or3oKzY6Rck=m9Mqfj6DgWUQUg AT mail DOT gmail DOT com> <20141218171116 DOT GF10824 AT calimero DOT vinschen DOT de> <8F8B22BA-B007-4F10-9B4F-9BD963D17059 AT etr-usa DOT com> <20141218173346 DOT GH10824 AT calimero DOT vinschen DOT de> <71891584-9B1C-430D-9A15-8EC385EB3F3F AT etr-usa DOT com> <20141218185114 DOT GJ10824 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20141218185114.GJ10824@calimero.vinschen.de>
User-Agent: Mutt/1.5.23 (2014-03-12)

--CFO0SFgG+t1lcV5s
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Dec 18 19:51, Corinna Vinschen wrote:
> On Dec 18 11:40, Warren Young wrote:
> > On Dec 18, 2014, at 10:33 AM, Corinna Vinschen <corinna-cygwin AT cygwin DOT c=
om> wrote:
> >=20
> > > On Dec 18 10:26, Warren Young wrote:
> > >>=20
> > >> ...Cygwin doesn=E2=80=99t do something similar?
> > >=20
> > > Cygwin isn't a kernel and the process
> > > information is kept in shared memory regions held by the parent proce=
ss
> > > and the process itself.  This model has limitations you don't have on=
 a
> > > real kernel.
> >=20
> > I=E2=80=99m aware of that, but can=E2=80=99t the DLL see both the birth=
 and death of
> > every Cygwin process?  Birth via either DllMain() or execvp(2), and
> > death via one of the methods here:
>=20
> Aren't we talking about fetching info from non-Cygwin processes?

On re-reading your question, I'm wondering if you don't have a slight
misconception.  Keep in mind that the (Cygwin) DLL is not a single
entity on the system.  Every process is running its own copy of the
Cygwin DLL.  The communication between different Cygwin process requires
bookkeeping outside of the DLL.  For instance, all Cygwin processes have
their own shared memory region constituting something akin to a process
table entry of an OS.  For security reasons, access to this shared
memory is restricted via ACLs, so not every process can open the process
info region of every process.

Back to the DLL.  There's one Cygwin DLL in every Cygwin process'
virtual memory.  If "the Cygwin DLL" is supposed to keep track of
life and death of every Cygwin process, you're in fact asking for
*every* Cygwin process keeping track of life and death of *every*
other Cygwin process.

Again, the Cygwin DLL is no kernel, and it's no process on its own.
It's just the core part of each Cygwin process, handling bookkeeping for
itself and its child processes, and otherwise trying to communicate with
the Cygwin DLLs in other processes in good faith.

Does that clarify the situation a bit?


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--CFO0SFgG+t1lcV5s
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUkyUwAAoJEPU2Bp2uRE+gJhYP/izrbFejK27ym8uW1UCHduWI
bWUNPTq78BZ5L1mBGyoPl9rpnwL2dC/mSZbZ5SqhuEIKPNTCxz8pI9/o79tXeRje
m6GbnT/uZPm+w9qRWsHzJzm6wh+bllt5bPujXA+zYUZn9AjbU6wh3Rig8Gz6UVKT
U3pyPIihTsjdDMwtOLcQWg4Uwwrj79TX83QKpuzNhRHQg/sLeHMoeOZGddqIy2cG
0UZUMHox4KDpxWBrZHZO3q1G9M6wdVxdHidCy6sAQaOuhnwgUTkFuTlBrp+mBCc9
chu63kVB3dWJeAL8RIxk2RHVAWKB8Hj2WxS7FpzqadbEPFzn1UKdBW5gyU+g2qOp
GXUVL5NpCrKx22Wz/9tNOmGIGkzrdz4YY8Ip2HsVbn4fV6Xko10XiDuH/RJbGCmu
PtID54u/J/AFMq9YdC/6plpra5nf9aaelHvtlJEoudZnQ8t9LC7WX3R72irRt2kW
FU/gObFaCXzVHumaX0Sc5LgfD8cbCxrchAAc0hr9b5tABqOMjWfkRU72lxgMDQRr
Egea+g24zd2SMqMfDuc1DWui2R9i2kZrcyN50QolhjpqzOPm4zPUh21gjMDklRtu
Qib4P5JiZUqBoNXnmT26GqYh3K8aJ5Lhd3q80Oq2+M6zFCrB+dbrjMHDB9V8mRen
gjEJNfXR/h6CvTd8idzr
=TKRf
-----END PGP SIGNATURE-----

--CFO0SFgG+t1lcV5s--

- Raw text -


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