summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-10-10 12:54:13 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-10-10 15:12:23 +1000
commitad25127c6ae902daa5af196a0607fa2ed88f301a (patch)
tree3e89aa01ccf564fd72397f82a019b428065f4b80
parent451e1eda9155e07da20cbda95ddba21c5eb29beb (diff)
xserver: use a default timout for 1s for Terminate() and Kill()
Terminate/Kill will only wait for the server to exit for a nonzero timeout, requiring callers to always specify a timeout for it to be useful. The use-case of sending a SIGTERM to the server but not waiting for it to shut down is narrow, so require those to actually specify a zero timeout instead of everyone else. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
-rw-r--r--include/xorg/gtest/xorg-gtest-xserver.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/xorg/gtest/xorg-gtest-xserver.h b/include/xorg/gtest/xorg-gtest-xserver.h
index 90784e7..8721b94 100644
--- a/include/xorg/gtest/xorg-gtest-xserver.h
+++ b/include/xorg/gtest/xorg-gtest-xserver.h
@@ -80,7 +80,7 @@ class XServer : public xorg::testing::Process {
* @returns true if termination succeeded and, if a timout is given, the
* process shut down within that timeout. false otherwise.
*/
- virtual bool Terminate(unsigned int timeout = 0);
+ virtual bool Terminate(unsigned int timeout = 1000);
/**
* Kills the server. With a vengeance.
@@ -92,7 +92,7 @@ class XServer : public xorg::testing::Process {
* @returns true if kill succeeded and, if a timout is given, the
* process shut down within that timeout. false otherwise.
*/
- virtual bool Kill(unsigned int timeout = 0);
+ virtual bool Kill(unsigned int timeout = 1000);
/**
* Remove the log file used by this server. By default, this function