diff options
-rw-r--r-- | src/Hooks/CCpp.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp index e3a12971..082c9d64 100644 --- a/src/Hooks/CCpp.cpp +++ b/src/Hooks/CCpp.cpp @@ -24,11 +24,18 @@ #include <string.h> #include <limits.h> #include <stdio.h> +#include <sys/types.h> #include <unistd.h> #include <time.h> +#include <syslog.h> #define CORESTEP (1024) +static void write_log(const char* pid) +{ + syslog(LOG_WARNING, "CrashCatcher: CCpp Language Hook: Crashed pid: %s", pid); +} + int main(int argc, char** argv) { const char* program_name = argv[0]; @@ -85,12 +92,12 @@ int main(int argc, char** argv) dd.SaveBinary(FILENAME_BINARYDATA1, core, ii); dd.Close(); free(core); + write_log(pid); } catch (std::string sError) { fprintf(stderr, "%s: %s\n", program_name, sError.c_str()); return -2; } - return 0; } |