| OLD | NEW |
| 1 // Copyright (c) 2010 Google Inc. | 1 // Copyright (c) 2010 Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | 29 |
| 30 #include <assert.h> | 30 #include <assert.h> |
| 31 #include <dirent.h> | |
| 32 #include <fcntl.h> | 31 #include <fcntl.h> |
| 33 #include <limits.h> | 32 #include <limits.h> |
| 34 #include <poll.h> | 33 #include <poll.h> |
| 35 #include <stdio.h> | 34 #include <stdio.h> |
| 36 #include <string.h> | 35 #include <string.h> |
| 37 #include <sys/socket.h> | 36 #include <sys/socket.h> |
| 38 #include <sys/stat.h> | 37 #include <sys/stat.h> |
| 39 #include <sys/types.h> | 38 #include <sys/types.h> |
| 40 #include <unistd.h> | 39 #include <unistd.h> |
| 41 | 40 |
| 42 #include <vector> | 41 #include <vector> |
| 43 | 42 |
| 44 #include "client/linux/crash_generation/crash_generation_server.h" | 43 #include "client/linux/crash_generation/crash_generation_server.h" |
| 45 #include "client/linux/crash_generation/client_info.h" | 44 #include "client/linux/crash_generation/client_info.h" |
| 46 #include "client/linux/handler/exception_handler.h" | 45 #include "client/linux/handler/exception_handler.h" |
| 47 #include "client/linux/minidump_writer/minidump_writer.h" | 46 #include "client/linux/minidump_writer/minidump_writer.h" |
| 48 #include "common/linux/eintr_wrapper.h" | 47 #include "common/linux/eintr_wrapper.h" |
| 49 #include "common/linux/guid_creator.h" | 48 #include "common/linux/guid_creator.h" |
| 50 #include "common/linux/safe_readlink.h" | 49 #include "common/linux/safe_readlink.h" |
| 51 | 50 |
| 51 #include <dirent.h> |
| 52 |
| 52 static const char kCommandQuit = 'x'; | 53 static const char kCommandQuit = 'x'; |
| 53 | 54 |
| 54 namespace google_breakpad { | 55 namespace google_breakpad { |
| 55 | 56 |
| 56 CrashGenerationServer::CrashGenerationServer( | 57 CrashGenerationServer::CrashGenerationServer( |
| 57 const int listen_fd, | 58 const int listen_fd, |
| 58 OnClientDumpRequestCallback dump_callback, | 59 OnClientDumpRequestCallback dump_callback, |
| 59 void* dump_context, | 60 void* dump_context, |
| 60 OnClientExitingCallback exit_callback, | 61 OnClientExitingCallback exit_callback, |
| 61 void* exit_context, | 62 void* exit_context, |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 325 |
| 325 // static | 326 // static |
| 326 void* | 327 void* |
| 327 CrashGenerationServer::ThreadMain(void *arg) | 328 CrashGenerationServer::ThreadMain(void *arg) |
| 328 { | 329 { |
| 329 reinterpret_cast<CrashGenerationServer*>(arg)->Run(); | 330 reinterpret_cast<CrashGenerationServer*>(arg)->Run(); |
| 330 return NULL; | 331 return NULL; |
| 331 } | 332 } |
| 332 | 333 |
| 333 } // namespace google_breakpad | 334 } // namespace google_breakpad |
| OLD | NEW |