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

Side by Side Diff: tools/android/forwarder/forwarder.cc

Issue 11366229: Move eintr_wrapper.h from base to base/posix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « tools/android/fake_dns/fake_dns.cc ('k') | tools/android/forwarder2/common.h » ('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 #include <errno.h> 5 #include <errno.h>
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include <netinet/in.h> 7 #include <netinet/in.h>
8 #include <netinet/tcp.h> 8 #include <netinet/tcp.h>
9 #include <pthread.h> 9 #include <pthread.h>
10 #include <signal.h> 10 #include <signal.h>
11 #include <stdio.h> 11 #include <stdio.h>
12 #include <stdlib.h> 12 #include <stdlib.h>
13 #include <string.h> 13 #include <string.h>
14 #include <sys/select.h> 14 #include <sys/select.h>
15 #include <sys/socket.h> 15 #include <sys/socket.h>
16 #include <sys/wait.h> 16 #include <sys/wait.h>
17 #include <unistd.h> 17 #include <unistd.h>
18 18
19 #include "base/command_line.h" 19 #include "base/command_line.h"
20 #include "base/eintr_wrapper.h"
21 #include "base/logging.h" 20 #include "base/logging.h"
21 #include "base/posix/eintr_wrapper.h"
22 #include "tools/android/common/adb_connection.h" 22 #include "tools/android/common/adb_connection.h"
23 #include "tools/android/common/daemon.h" 23 #include "tools/android/common/daemon.h"
24 #include "tools/android/common/net.h" 24 #include "tools/android/common/net.h"
25 25
26 namespace { 26 namespace {
27 27
28 const pthread_t kInvalidThread = static_cast<pthread_t>(-1); 28 const pthread_t kInvalidThread = static_cast<pthread_t>(-1);
29 volatile bool g_killed = false; 29 volatile bool g_killed = false;
30 30
31 void CloseSocket(int fd) { 31 void CloseSocket(int fd) {
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 for (int i = 0; i < g_server_count; i++) 417 for (int i = 0; i < g_server_count; i++)
418 g_servers[i].StartThread(); 418 g_servers[i].StartThread();
419 for (int i = 0; i < g_server_count; i++) 419 for (int i = 0; i < g_server_count; i++)
420 g_servers[i].JoinThread(); 420 g_servers[i].JoinThread();
421 g_server_count = 0; 421 g_server_count = 0;
422 delete [] g_servers; 422 delete [] g_servers;
423 423
424 return 0; 424 return 0;
425 } 425 }
426 426
OLDNEW
« no previous file with comments | « tools/android/fake_dns/fake_dns.cc ('k') | tools/android/forwarder2/common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698