On 04/18/2012 01:39 PM, Chase Douglas wrote:
> Signed-off-by: Chase Douglas <[email protected]>

Reviewed-by: Stephen M. Webb <[email protected]>

> ---
>  include/xorg/gtest/environment.h |    5 +++++
>  src/environment.cpp              |    6 ++++++
>  2 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/include/xorg/gtest/environment.h 
> b/include/xorg/gtest/environment.h
> index 55b590d..e113cd7 100644
> --- a/include/xorg/gtest/environment.h
> +++ b/include/xorg/gtest/environment.h
> @@ -139,6 +139,11 @@ class Environment : public ::testing::Environment {
>     */
>    int display() const;
>  
> +  /**
> +   * Kill the dummy Xorg server with SIGKILL.
> +   */
> +  void Kill();
> +
>   protected:
>    /**
>     * Starts the dummy X server.
> diff --git a/src/environment.cpp b/src/environment.cpp
> index f4bb9e1..c1c4d80 100644
> --- a/src/environment.cpp
> +++ b/src/environment.cpp
> @@ -152,3 +152,9 @@ void xorg::testing::Environment::TearDown() {
>                  << std::strerror(errno) << "\n";
>    }
>  }
> +
> +void xorg::testing::Environment::Kill() {
> +  if (!d_->process.Kill())
> +    std::cerr << "Warning: Failed to kill dummy Xorg server: "
> +              << std::strerror(errno) << "\n";
> +}

-- 
Stephen M. Webb  <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to