OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // TODO(jamiewalch): Add unit tests for this. | 5 // TODO(jamiewalch): Add unit tests for this. |
6 | 6 |
7 #include "remoting/host/sighup_listener_mac.h" | 7 #include "remoting/host/posix/sighup_listener.h" |
8 | 8 |
9 #include <errno.h> | 9 #include <errno.h> |
| 10 #include <signal.h> |
10 | 11 |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "base/eintr_wrapper.h" | 13 #include "base/eintr_wrapper.h" |
13 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
14 #include "base/message_pump_libevent.h" | 15 #include "base/message_pump_libevent.h" |
15 #include "base/threading/platform_thread.h" | 16 #include "base/threading/platform_thread.h" |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 class SigHupListener : public base::MessagePumpLibevent::Watcher { | 20 class SigHupListener : public base::MessagePumpLibevent::Watcher { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 if (signal(SIGHUP, HupSignalHandler) == SIG_ERR) { | 85 if (signal(SIGHUP, HupSignalHandler) == SIG_ERR) { |
85 delete g_config_updater; | 86 delete g_config_updater; |
86 g_config_updater = NULL; | 87 g_config_updater = NULL; |
87 LOG(ERROR) << "signal() failed: " << errno; | 88 LOG(ERROR) << "signal() failed: " << errno; |
88 return false; | 89 return false; |
89 } | 90 } |
90 return true; | 91 return true; |
91 } | 92 } |
92 | 93 |
93 } // namespace remoting | 94 } // namespace remoting |
OLD | NEW |