[PATCH 0/3] Updated patches for /proc/<pid>/environ

Erik Bray erik.m.bray@gmail.com
Tue Jan 10 15:02:00 GMT 2017


From: "Erik M. Bray" <erik.bray@lri.fr>

Updated versions of the patch set originally submitted at
https://cygwin.com/ml/cygwin-patches/2017-q1/msg00000.html

I think all the indentation/whitespace/braces are cleaned up and consistent.

I've also made sure that /proc/self/environ works now.

All new code in these patches is licensed under the 2-clause BSD:

==============================================================================
Copyright (c) 2017, Erik M. Bray
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

===============================================================================

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/environ.cc          | 84 +++++++++++++++++++++++----------------
 winsup/cygwin/environ.h           |  2 +
 winsup/cygwin/fhandler_process.cc | 22 ++++++++++
 winsup/cygwin/pinfo.cc            | 83 +++++++++++++++++++++++++++++++++++++-
 winsup/cygwin/pinfo.h             |  4 +-
 5 files changed, 157 insertions(+), 38 deletions(-)

-- 
2.8.3



More information about the Cygwin-patches mailing list