Chromium Code Reviews| 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() { |