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

Side by Side Diff: content/zygote/zygote_main_linux.cc

Issue 100253002: Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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 | « content/plugin/plugin_channel.cc ('k') | device/bluetooth/bluetooth_socket_chromeos.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 #include "content/zygote/zygote_main.h" 5 #include "content/zygote/zygote_main.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <errno.h>
8 #include <fcntl.h> 9 #include <fcntl.h>
9 #include <pthread.h> 10 #include <pthread.h>
10 #include <stdio.h> 11 #include <stdio.h>
11 #include <sys/socket.h> 12 #include <sys/socket.h>
12 #include <sys/stat.h> 13 #include <sys/stat.h>
13 #include <sys/types.h> 14 #include <sys/types.h>
14 #include <sys/wait.h> 15 #include <sys/wait.h>
15 #include <unistd.h> 16 #include <unistd.h>
16 17
17 #include "base/basictypes.h" 18 #include "base/basictypes.h"
18 #include "base/bind.h" 19 #include "base/bind.h"
19 #include "base/callback.h" 20 #include "base/callback.h"
20 #include "base/command_line.h" 21 #include "base/command_line.h"
21 #include "base/linux_util.h" 22 #include "base/linux_util.h"
22 #include "base/native_library.h" 23 #include "base/native_library.h"
23 #include "base/pickle.h" 24 #include "base/pickle.h"
24 #include "base/posix/eintr_wrapper.h"
25 #include "base/posix/unix_domain_socket_linux.h" 25 #include "base/posix/unix_domain_socket_linux.h"
26 #include "base/rand_util.h" 26 #include "base/rand_util.h"
27 #include "base/sys_info.h" 27 #include "base/sys_info.h"
28 #include "build/build_config.h" 28 #include "build/build_config.h"
29 #include "content/common/child_process_sandbox_support_impl_linux.h" 29 #include "content/common/child_process_sandbox_support_impl_linux.h"
30 #include "content/common/font_config_ipc_linux.h" 30 #include "content/common/font_config_ipc_linux.h"
31 #include "content/common/pepper_plugin_list.h" 31 #include "content/common/pepper_plugin_list.h"
32 #include "content/common/sandbox_linux.h" 32 #include "content/common/sandbox_linux.h"
33 #include "content/common/zygote_commands_linux.h" 33 #include "content/common/zygote_commands_linux.h"
34 #include "content/public/common/content_switches.h" 34 #include "content/public/common/content_switches.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 PreloadPepperPlugins(); 304 PreloadPepperPlugins();
305 #endif 305 #endif
306 #if defined(ENABLE_WEBRTC) 306 #if defined(ENABLE_WEBRTC)
307 InitializeWebRtcModule(); 307 InitializeWebRtcModule();
308 #endif 308 #endif
309 SkFontConfigInterface::SetGlobal( 309 SkFontConfigInterface::SetGlobal(
310 new FontConfigIPC(GetSandboxFD()))->unref(); 310 new FontConfigIPC(GetSandboxFD()))->unref();
311 } 311 }
312 312
313 static void CloseFdAndHandleEintr(int fd) { 313 static void CloseFdAndHandleEintr(int fd) {
314 (void) HANDLE_EINTR(close(fd)); 314 close(fd);
315 } 315 }
316 316
317 // This will set the *using_suid_sandbox variable to true if the SUID sandbox 317 // This will set the *using_suid_sandbox variable to true if the SUID sandbox
318 // is enabled. This does not necessarily exclude other types of sandboxing. 318 // is enabled. This does not necessarily exclude other types of sandboxing.
319 static bool EnterSuidSandbox(LinuxSandbox* linux_sandbox, 319 static bool EnterSuidSandbox(LinuxSandbox* linux_sandbox,
320 bool* using_suid_sandbox, 320 bool* using_suid_sandbox,
321 bool* has_started_new_init) { 321 bool* has_started_new_init) {
322 *using_suid_sandbox = false; 322 *using_suid_sandbox = false;
323 *has_started_new_init = false; 323 *has_started_new_init = false;
324 324
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 434 }
435 435
436 int sandbox_flags = linux_sandbox->GetStatus(); 436 int sandbox_flags = linux_sandbox->GetStatus();
437 437
438 Zygote zygote(sandbox_flags, forkdelegate); 438 Zygote zygote(sandbox_flags, forkdelegate);
439 // This function call can return multiple times, once per fork(). 439 // This function call can return multiple times, once per fork().
440 return zygote.ProcessRequests(); 440 return zygote.ProcessRequests();
441 } 441 }
442 442
443 } // namespace content 443 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/plugin_channel.cc ('k') | device/bluetooth/bluetooth_socket_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698