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

Side by Side Diff: remoting/host/posix/sighup_listener.cc

Issue 10825410: Update linux host to handle SIGHUP. use it to reload config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/posix/sighup_listener.h ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « remoting/host/posix/sighup_listener.h ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698