[PATCH xorg-gtest 1/3] Add Environment::Kill() to forcefully terminate the dummy Xorg server
Stephen M. Webb
stephen.webb at bregmasoft.ca
Mon Apr 23 07:28:54 PDT 2012
On 04/18/2012 01:39 PM, Chase Douglas wrote:
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
Reviewed-by: Stephen M. Webb <stephen.webb at bregmasoft.ca>
> ---
> 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 <stephen.webb at bregmasoft.ca>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120423/14f6e900/attachment-0001.pgp>
More information about the xorg-devel
mailing list