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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Erik Bray
From: "Erik M. Bray" <[hidden email]>

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Corinna Vinschen-2
On Jan 10 16:02, Erik Bray wrote:

> From: "Erik M. Bray" <[hidden email]>
>
> 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:
> [...]
You don't have to repeat that for any later patch you'd like to propose,
I added you to the CONTRIBUTORS file now.  Thank you!

> ===============================================================================
>
> 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(-)
Patchset applied.  The formatting in pinfo.cc was still not entirely
correct, but I tweaked it manually.  Please have a look into commit
171046d.


Thanks a lot!
Corinna

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

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Erik Bray
On Tue, Jan 10, 2017 at 4:41 PM, Corinna Vinschen
<[hidden email]> wrote:

> On Jan 10 16:02, Erik Bray wrote:
>> From: "Erik M. Bray" <[hidden email]>
>>
>> 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:
>> [...]
>
> You don't have to repeat that for any later patch you'd like to propose,
> I added you to the CONTRIBUTORS file now.  Thank you!

Great!

>> ===============================================================================
>>
>> 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(-)
>
> Patchset applied.  The formatting in pinfo.cc was still not entirely
> correct, but I tweaked it manually.  Please have a look into commit
> 171046d.

Ah, I see now.  I think what happened is that in my vim it *does* look
properly aligned, but I haven't changed my settings the way you
suggested yet.  Part of the problem is still the mixing of tabs and
spaces (even within that function), and I have ts=4, sw=4 so to me it
looked aligned.

Thanks for fixing it, and for accepting the patches!

Erik
Loading...