You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2014/04/08 20:16:25 UTC

Review Request 20127: Made os::system async signal safe.

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

Review request for mesos, Ben Mahler and Ian Downes.


Repository: mesos-git


Description
-------

See summary.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 

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


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 20127: Made os::system async signal safe.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/#review39935
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
<https://reviews.apache.org/r/20127/#comment72703>

    s/thus/which/



3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
<https://reviews.apache.org/r/20127/#comment72705>

    I agree with Ian, lets just return status. I think its more flexible (for e.g: users could do WTERMSIG(status)).


- Vinod Kone


On April 9, 2014, 7:43 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20127/
> -----------------------------------------------------------
> 
> (Updated April 9, 2014, 7:43 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 
> 
> Diff: https://reviews.apache.org/r/20127/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 20127: Made os::system async signal safe.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/#review39939
-----------------------------------------------------------


Also attach the bug?

- Vinod Kone


On April 9, 2014, 7:43 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20127/
> -----------------------------------------------------------
> 
> (Updated April 9, 2014, 7:43 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 
> 
> Diff: https://reviews.apache.org/r/20127/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 20127: Made os::system async signal safe.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/#review40035
-----------------------------------------------------------

Ship it!


Ship It!

- Vinod Kone


On April 10, 2014, 4:57 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20127/
> -----------------------------------------------------------
> 
> (Updated April 10, 2014, 4:57 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Bugs: MESOS-1197
>     https://issues.apache.org/jira/browse/MESOS-1197
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 8eb3523 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 
> 
> Diff: https://reviews.apache.org/r/20127/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 20127: Made os::system async signal safe.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/#review40033
-----------------------------------------------------------

Ship it!


Ship It!

- Ian Downes


On April 10, 2014, 4:57 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20127/
> -----------------------------------------------------------
> 
> (Updated April 10, 2014, 4:57 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Bugs: MESOS-1197
>     https://issues.apache.org/jira/browse/MESOS-1197
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 8eb3523 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 
> 
> Diff: https://reviews.apache.org/r/20127/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 20127: Made os::system async signal safe.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/
-----------------------------------------------------------

(Updated April 10, 2014, 4:57 p.m.)


Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.


Changes
-------

Review comments.


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


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 8eb3523 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 

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


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 20127: Made os::system async signal safe.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/
-----------------------------------------------------------

(Updated April 9, 2014, 7:43 p.m.)


Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.


Changes
-------

+ vinod


Repository: mesos-git


Description
-------

See summary.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 

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


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 20127: Made os::system async signal safe.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/#review39814
-----------------------------------------------------------


Patch looks great!

Reviews applied: [20127]

All tests passed.

- Mesos ReviewBot


On April 8, 2014, 6:59 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20127/
> -----------------------------------------------------------
> 
> (Updated April 8, 2014, 6:59 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Ian Downes.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 
> 
> Diff: https://reviews.apache.org/r/20127/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 20127: Made os::system async signal safe.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/
-----------------------------------------------------------

(Updated April 8, 2014, 6:59 p.m.)


Review request for mesos, Ben Mahler and Ian Downes.


Changes
-------

Ian's comments.


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 

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


Testing
-------

make check


Thanks,

Jie Yu


Re: Review Request 20127: Made os::system async signal safe.

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

> On April 8, 2014, 6:36 p.m., Ian Downes wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 574
> > <https://reviews.apache.org/r/20127/diff/1/?file=553118#file553118line574>
> >
> >     standard system() just returns the exit status of the shell, whatever that may be.
> 
> Jie Yu wrote:
>     Yeah, but the users of os::system needs to check WIFEXITED(status) and WEXITSTATUS(status) then. I prefer not having users worry about that:) What do you think?

Changed my mind. Return status now.


- Jie


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


On April 9, 2014, 7:43 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20127/
> -----------------------------------------------------------
> 
> (Updated April 9, 2014, 7:43 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 
> 
> Diff: https://reviews.apache.org/r/20127/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 20127: Made os::system async signal safe.

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

> On April 8, 2014, 6:36 p.m., Ian Downes wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 555
> > <https://reviews.apache.org/r/20127/diff/1/?file=553118#file553118line555>
> >
> >     Can we return Try<int> for descriptive (hard coded) error messages and remain async signal safe? If not, perhaps document this so someone else doesn't add it later :-)

Try involves "new" -> involves "malloc" -> async signal unsafe.

Will document this.


> On April 8, 2014, 6:36 p.m., Ian Downes wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 574
> > <https://reviews.apache.org/r/20127/diff/1/?file=553118#file553118line574>
> >
> >     standard system() just returns the exit status of the shell, whatever that may be.

Yeah, but the users of os::system needs to check WIFEXITED(status) and WEXITSTATUS(status) then. I prefer not having users worry about that:) What do you think?


> On April 8, 2014, 6:36 p.m., Ian Downes wrote:
> > 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp, line 136
> > <https://reviews.apache.org/r/20127/diff/1/?file=553119#file553119line136>
> >
> >     what about testing the failure path in the child?
> >     
> >     EXPECT_EQ(-1, os::system("invalid.command.that.should.not.be.found"));

Done.


- Jie


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


On April 8, 2014, 6:16 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20127/
> -----------------------------------------------------------
> 
> (Updated April 8, 2014, 6:16 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Ian Downes.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 
> 
> Diff: https://reviews.apache.org/r/20127/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 20127: Made os::system async signal safe.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20127/#review39808
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
<https://reviews.apache.org/r/20127/#comment72437>

    Can we return Try<int> for descriptive (hard coded) error messages and remain async signal safe? If not, perhaps document this so someone else doesn't add it later :-)



3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
<https://reviews.apache.org/r/20127/#comment72440>

    standard system() just returns the exit status of the shell, whatever that may be.



3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp
<https://reviews.apache.org/r/20127/#comment72438>

    what about testing the failure path in the child?
    
    EXPECT_EQ(-1, os::system("invalid.command.that.should.not.be.found"));


- Ian Downes


On April 8, 2014, 6:16 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20127/
> -----------------------------------------------------------
> 
> (Updated April 8, 2014, 6:16 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Ian Downes.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp db5ae69 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp d61db30 
> 
> Diff: https://reviews.apache.org/r/20127/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>