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=IASewXtWOQlPXh/6NjUYKzdc80AWMwPWVxfz7aHhshFCkWn8b4CF1 iT/5+TLQHhr9LneYnbKSk3m9bPEp0dYA98zk2+2o6/qJ41Q+UBHWI8Ai9ODQ1erJ MzI+8TX2DJojgFSe1qI2/3c02XKPR+r8CCPffuqwjVN5csy1l7ojhw= 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=H/i2kk3+w4D23YHi4WRZJyrynbY=; b=hfqW3T77jLNHVZyt1xiGJhPhd8Gw 2WGzi54w6Jmgeqv8/dZXCpHCRRedhPDg8yoSpTSELMks2QgSBwEeY9BDKeJTAsRA aAApEFw7a3fD330cL3QRvq4vCEN3D23aa56fLfaWFsfdoy48wPXvwupU1RjhIWin pjIyYOyTWhAKzYA= 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=-101.5 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1641, highly, H*F:D*cygwin.com X-HELO: drew.franken.de Date: Thu, 17 Nov 2016 15:00:12 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Retrieving per-process environment block? Message-ID: <20161117140012.GA23664@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) --17pEHd4RhPHOinZp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Nov 17 14:30, Erik Bray wrote: > Hi all, >=20 > For a quick bit of background, I'm working on porting the highly > useful psutil [1] Python library to Cygwin. This has proved an > interesting exercise, as much of the functionality of psutil works on > Cygwin through existing POSIX interfaces, and a handful of > Linux-specific interfaces as well. But there are some bits that > simply don't map at all. >=20 > The one I'm struggling with right now is retrieving Cygwin environment > variables for a process (under inspection--i.e. not listing a > process's environment from within that process which is obviously > trivial). >=20 > I've looked at every route I could conceive of but as far as I can > tell this is currently impossible. That's fine for now--I simply > disable that functionality in psutil. But it is unfortunate, though, > since the information is there. >=20 > There are a couple avenues I could see to this. The most "obvious" > (to me) being to implement /proc//environ. >=20 > I would be willing to provide a patch for this if it would be > accepted. Is there some particular non-obvious hurdle to this that it > hasn't been implemented? Obviously there are security > implications--the /proc//environ should only be readable to the > process's owner, but that is already within Cygwin's capabilities, and > works for other /proc files. Patch welcome. Implementing this should be fairly straightforward. The only hurdle is winsup/CONTRIBUTORS ;) Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --17pEHd4RhPHOinZp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYLbfsAAoJEPU2Bp2uRE+gekUP/2wyT+LH4HamjwDd/CEku3ra pbqx69OSbUCSoLwNA9xhuIAmZtJduVLqL+0e+PI5yDc1KcGj4KG5Cu27O/gjnmGL ylUShOG4BomwDUH2ryPBiFBg9Cu0xeOeo1dnhI6NfcQyFKQJZFL5cZ6xwWoX+U6j QSgaCnmLQgTUMX7N3tz9fGiOnFHiAvIHmUV+LYSq7CAVMt9nrRUaXxZMNuL4ETdj StGtT7PIlj9cXlVkJ36PJ8fD6YQ0KgNZs3YLL7umHJZN1gAsL/QU8eRa3hdi3xuf 4Pj7L155FYp0RLwhbRa/Br7kZMwyoK+WlQFfRztKT7QBq9G9e5onW1ldMUKOaL4B a0/79KzuTe4NjIN9Kq2zJHRxaJJ/KaXTUJ8hh+lQjA5dYMM7/JkCc0oUIbAWFFO2 JJnNR3qdnSqqP1N1rWw7F8SkK0xRuaP2ar+PiXnWhgRmeMO3Er/OZ+m/CDokJhJ2 x+L3WcpddpBDphIwBqx4Bxn83zqLcJOYv30dpN2skX2lMbKriIeYBa2m8EomkV7O 9MUjgULLVd42n3k0GIaC4UpZmQsIojAYkS2Qs68GWJ4nXcRe/sdoUYEVfu9Xf1w9 TVbrjlI/SffRoI3PlEquLDHYliQvdr1IG74eJHUw5UxDZThhIBV4/B04tX3ELsle ORHHymz9QwKEqOoMA5rh =wyq8 -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp--