You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2016/02/29 01:08:20 UTC

Review Request 44151: Added stout functions to get and set supplementary groud ids.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44151/
-----------------------------------------------------------

Review request for mesos, Ian Downes and Timothy Chen.


Bugs: MESOS-4757
    https://issues.apache.org/jira/browse/MESOS-4757


Repository: mesos


Description
-------

Added stout functions to get and set supplementary groud ids.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 84a2a021859d4e5c8547ad2a509eebda428a8255 

Diff: https://reviews.apache.org/r/44151/diff/


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 44151: Added stout functions to get and set supplementary groud ids.

Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44151/#review121170
-----------------------------------------------------------




3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp (line 338)
<https://reviews.apache.org/r/44151/#comment182831>

    It would be cleaner just to pass the vector data directly:
    
    ```C
    ::setgroups(gids.size(), &gids[0])
    ```


- James Peach


On Feb. 29, 2016, 12:08 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44151/
> -----------------------------------------------------------
> 
> (Updated Feb. 29, 2016, 12:08 a.m.)
> 
> 
> Review request for mesos, Ian Downes and Timothy Chen.
> 
> 
> Bugs: MESOS-4757
>     https://issues.apache.org/jira/browse/MESOS-4757
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added stout functions to get and set supplementary groud ids.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 84a2a021859d4e5c8547ad2a509eebda428a8255 
> 
> Diff: https://reviews.apache.org/r/44151/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 44151: Added stout functions to get and set supplementary groud ids.

Posted by Jie Yu <yu...@gmail.com>.

> On Feb. 29, 2016, 12:39 a.m., James Peach wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp, line 310
> > <https://reviews.apache.org/r/44151/diff/1/?file=1273688#file1273688line310>
> >
> >     Darwin does have a ``gid_t`` type, why is this ifdef needed?

::getgrouplist on Darwin expect `int*` for gids. My clang complains about it if I use `gid_t gids[NGROUPS_MAX]`.


- Jie


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44151/#review121172
-----------------------------------------------------------


On Feb. 29, 2016, 12:08 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44151/
> -----------------------------------------------------------
> 
> (Updated Feb. 29, 2016, 12:08 a.m.)
> 
> 
> Review request for mesos, Ian Downes and Timothy Chen.
> 
> 
> Bugs: MESOS-4757
>     https://issues.apache.org/jira/browse/MESOS-4757
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added stout functions to get and set supplementary groud ids.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 84a2a021859d4e5c8547ad2a509eebda428a8255 
> 
> Diff: https://reviews.apache.org/r/44151/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 44151: Added stout functions to get and set supplementary groud ids.

Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44151/#review121172
-----------------------------------------------------------




3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp (line 310)
<https://reviews.apache.org/r/44151/#comment182833>

    Darwin does have a ``gid_t`` type, why is this ifdef needed?


- James Peach


On Feb. 29, 2016, 12:08 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44151/
> -----------------------------------------------------------
> 
> (Updated Feb. 29, 2016, 12:08 a.m.)
> 
> 
> Review request for mesos, Ian Downes and Timothy Chen.
> 
> 
> Bugs: MESOS-4757
>     https://issues.apache.org/jira/browse/MESOS-4757
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added stout functions to get and set supplementary groud ids.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 84a2a021859d4e5c8547ad2a509eebda428a8255 
> 
> Diff: https://reviews.apache.org/r/44151/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 44151: Added stout functions to get and set supplementary groud ids.

Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44151/#review121174
-----------------------------------------------------------




3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp (line 314)
<https://reviews.apache.org/r/44151/#comment182835>

    On mosys systems, you should get the max groups from ``sysconf``.


- James Peach


On Feb. 29, 2016, 12:08 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44151/
> -----------------------------------------------------------
> 
> (Updated Feb. 29, 2016, 12:08 a.m.)
> 
> 
> Review request for mesos, Ian Downes and Timothy Chen.
> 
> 
> Bugs: MESOS-4757
>     https://issues.apache.org/jira/browse/MESOS-4757
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added stout functions to get and set supplementary groud ids.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 84a2a021859d4e5c8547ad2a509eebda428a8255 
> 
> Diff: https://reviews.apache.org/r/44151/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 44151: Added stout functions to get and set supplementary groud ids.

Posted by Cong Wang <xi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44151/#review121280
-----------------------------------------------------------




3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp (line 322)
<https://reviews.apache.org/r/44151/#comment182954>

    You can construct vector with array, no need to bother a loop.



3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp (line 335)
<https://reviews.apache.org/r/44151/#comment182956>

    Use vector::data()?


- Cong Wang


On Feb. 29, 2016, 12:08 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44151/
> -----------------------------------------------------------
> 
> (Updated Feb. 29, 2016, 12:08 a.m.)
> 
> 
> Review request for mesos, Ian Downes and Timothy Chen.
> 
> 
> Bugs: MESOS-4757
>     https://issues.apache.org/jira/browse/MESOS-4757
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added stout functions to get and set supplementary groud ids.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 84a2a021859d4e5c8547ad2a509eebda428a8255 
> 
> Diff: https://reviews.apache.org/r/44151/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>