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 // A mini-zygote specifically for Native Client. | 5 // A mini-zygote specifically for Native Client. |
6 | 6 |
7 #include "chrome/common/nacl_helper_linux.h" | 7 #include "chrome/common/nacl_helper_linux.h" |
8 | 8 |
9 #include <errno.h> | 9 #include <errno.h> |
10 #include <link.h> | 10 #include <link.h> |
| 11 #include <stdio.h> |
11 #include <stdlib.h> | 12 #include <stdlib.h> |
12 #include <sys/socket.h> | 13 #include <sys/socket.h> |
13 #include <sys/types.h> | 14 #include <sys/types.h> |
14 | 15 |
15 #include <string> | 16 #include <string> |
16 #include <vector> | 17 #include <vector> |
17 | 18 |
18 #include "base/at_exit.h" | 19 #include "base/at_exit.h" |
19 #include "base/command_line.h" | 20 #include "base/command_line.h" |
20 #include "base/eintr_wrapper.h" | 21 #include "base/eintr_wrapper.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 230 } |
230 } | 231 } |
231 // if fork fails, send PID=-1 to zygote | 232 // if fork fails, send PID=-1 to zygote |
232 if (!UnixDomainSocket::SendMsg(kNaClZygoteDescriptor, &badpid, | 233 if (!UnixDomainSocket::SendMsg(kNaClZygoteDescriptor, &badpid, |
233 sizeof(badpid), empty)) { | 234 sizeof(badpid), empty)) { |
234 LOG(ERROR) << "*** send() to zygote failed"; | 235 LOG(ERROR) << "*** send() to zygote failed"; |
235 } | 236 } |
236 } | 237 } |
237 CHECK(false); // This routine must not return | 238 CHECK(false); // This routine must not return |
238 } | 239 } |
OLD | NEW |