X-Recipient: archive-cygwin@delorie.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=VdcmzUYGGVtGsHa4I2mGYbr9qxyyHRiR9QksZtxSRnfVGW0UVxiCE
	3F8dAl0VoNpI6AjPqwFuJNBvhM0CzJoyW0gIhF4CLD4aVut6d6rUGiHBsT2MvUk6
	td2Cl2VmZ073zosFDUuWJjlKryGGfqB3w5oXOC+aFShNd5She1k6FE=
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=9tfUTsU8CLmDaQYvXbE0CtQinD0=; b=XfjWtmRjH3wgm2okioL48wxaGfd7
	IGGws3CnDnQFE06yyWlC3azDVi0RyLEvS9hWQwYaQPpXlvyZ2OT01AfD8oRF4Hos
	zxOwtG/0zqXc5Yi0zGLfNEJYquQyLM07JLaLIPFTMnszokA5NEW5DBhvtkY3jx1e
	QqkHYxQXZetXQ3I=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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 19:34:30 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: ps questions
Message-ID: <20141218183430.GI10824@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <CAO2ddnZChb-n9+Z1YEWCFSA=WTaYfkmHdjMZk7Te5JYckUDE+Q@mail.gmail.com> <5492EDFC.5080608@gmail.com> <CAO2ddnZHs=4GxUJtjgoyTXO2Or3oKzY6Rck=m9Mqfj6DgWUQUg@mail.gmail.com> <20141218171116.GF10824@calimero.vinschen.de> <CAO2ddnY_rFHmXjE=rjdqCLw=N+bcHfRb-p17Cn3CHi6AbP40Og@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="OXAoLeOWtqbacoe/"
Content-Disposition: inline
In-Reply-To: <CAO2ddnY_rFHmXjE=rjdqCLw=N+bcHfRb-p17Cn3CHi6AbP40Og@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)

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

On Dec 18 18:56, BGINFO4X wrote:
> 2014-12-18 18:11 GMT+01:00 Corinna Vinschen <...>
> > The <defunct> information is fetched from the process itself.  This
> > requires a living, valid Cygwin process, so the info isn't available for
> > Windows processes.
> >
>=20
> Hello again, forgive me if this is stupid:
>=20
> If any cygwin process has the values
> cwd=3D/proc/$PID
> root=3D/
>=20
> Instead of fetching the information, you can "hardcode" the values. Isn't=
 it?

And how much sense does it make?

The root value is most of the time ok, unless a process runs under
chroot.

The cwd value on the other hand...  /proc is a virtual, Cygwin-only
directory and isn't a valid CWD for a non-Cygwin process.
And you can't call the OS for the CWD of another process.  On Windows,
the CWD is a process-local concept, not supported by the kernel.
Fetching the CWD of a process requires read access to the VM of a
process and a bit of undocumented NT magic.


Corinna

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

--OXAoLeOWtqbacoe/
Content-Type: application/pgp-signature

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

iQIcBAEBAgAGBQJUkx42AAoJEPU2Bp2uRE+gB+cQAJ1dWFV1ms5Eh6Ncf1LeFjD1
H3K2If0xrJGlwg+Dw9MBgIdXruNcjyAJMDpN7m0Sv64K5X97nj6LGZYNKsZcHr7L
5rQB3Bqn5LzfhdyhQ+1uv+A7NKNPbpfF8ak/p6bgDsLNUhwDpQ2ejXvAUu/Y3sPx
qrB4PJRnxXYXlCLkJHwSbliKOGVCGBadR48nip1F/tT8tEmFicJRjBAKbQ7wKcWm
H8zOLOMQ+Ewz23snE87RgZVpMMN98BVyOvJF2sHMy7JJjEMSY2HZTu3AZU6vHyIC
oBrd8DamTNZNwVnNuRjKnt+i9IYgonsmviFZPv7gfEhBBNGjZ7LVfM22RYdbkSmi
nm0Rlqq3wrcI3pmsAgJ02iJajsrKFFLmpCSEMFjwPeVJ94wv9jU0ANfDQy72MOKi
qg3L8BZKsjjD7Z/1gaPObonsLTOPw4RYkULB/blPq4B4O96lJO0ajiDBqKuiSHLZ
I1OWOtt/pLAtPc/Nf2JkVDARnqPSwOR+xBycE6pEp9pd11VtYuu49meBerWbrloB
5VV3JX7P3NaRQ9YW/1bB2z1inVGS0uUxVELiCLHAHAFIRuZ1ozDznLGYW++6ld1j
efIou/elKMeD3FfrlrJiZcZ+kt/BCUkntCUe4/K09583Nij1tyZBSpI21EZE86q/
hN4PrB5yB9PeMVmYuCb0
=cwbJ
-----END PGP SIGNATURE-----

--OXAoLeOWtqbacoe/--
