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=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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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 19:34:30 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: ps questions Message-ID: <20141218183430.GI10824@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <5492EDFC DOT 5080608 AT gmail DOT com> <20141218171116 DOT GF10824 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXAoLeOWtqbacoe/" Content-Disposition: inline In-Reply-To: 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 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/--