This is the mail archive of the cygwin-patches mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/3] Add support for /proc/<pid>/environ

Hi Erik,

On Jan  5 18:39, wrote:
> From: "Erik M. Bray" <>
> Per this discussion started in this thread:
> I finally got around to finishing a patch for this feature. It supports both Cygwin and
> native Windows processes, more or less following the example of how /proc/<pid>/cmdline is
> implemented.
> Erik M. Bray (3):
>   Move the core environment parsing of environ_init into a new
>     win32env_to_cygenv function.
>   Add a _pinfo.environ() method analogous to _pinfo.cmdline(), and
>     others.
>   Add a /proc/<pid>/environ proc file handler, analogous to
>     /proc/<pid>/cmdline.
>  winsup/cygwin/          | 84 +++++++++++++++++++++---------------
>  winsup/cygwin/environ.h           |  2 +
>  winsup/cygwin/ | 22 ++++++++++
>  winsup/cygwin/            | 89 ++++++++++++++++++++++++++++++++++++++-
>  winsup/cygwin/pinfo.h             |  4 +-
>  5 files changed, 163 insertions(+), 38 deletions(-)

Patch looks good basically, but I have a few nits:

- We need your 2-clause BSD license text per the "Before you get started"
  section of  For the text see;a=blob;f=winsup/CONTRIBUTORS

- While this appears to work nicely on other processes, it seems to be
  broken on the process itself.  Did you try `cat /proc/self/environ'?
  I'm getting a "Bad address" error when trying that.

- A few formatting issues, see my next replies.

Other than that, thanks for this nice addition!


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

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]