Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: webkit/tools/test_shell/test_shell_gtk.cc

Issue 45003: Install more signal handlers so test shell cleanup after itself. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_gtk.cc
===================================================================
--- webkit/tools/test_shell/test_shell_gtk.cc (revision 11401)
+++ webkit/tools/test_shell/test_shell_gtk.cc (working copy)
@@ -49,6 +49,11 @@
}
+static void TerminationSignalHandler(int signatl) {
+ TestShell::ShutdownTestShell();
+ exit(0);
+}
+
// static
void TestShell::InitializeTestShell(bool layout_test_mode) {
window_list_ = new WindowList;
@@ -182,6 +187,10 @@
if (!FcConfigSetCurrent(fontcfg))
LOG(FATAL) << "Failed to set the default font configuration";
+
+ // Install an signal handler so we clean up after ourselves.
Evan Stade 2009/03/11 01:26:38 nit: an->a
+ signal(SIGINT, TerminationSignalHandler);
+ signal(SIGTERM, TerminationSignalHandler);
}
void TestShell::PlatformShutdown() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698