diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-12 18:31:57 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-12 18:31:57 +0100 |
commit | f8196efffcf8fc5eea3519bef4e010098e78e89d (patch) | |
tree | a5fae0b5441646f0151a8eebeb17ba6b448e37b3 | |
parent | 3c50cb18a117201176b300eca1a8c2df938bb0b3 (diff) | |
download | abrt-f8196efffcf8fc5eea3519bef4e010098e78e89d.tar.gz abrt-f8196efffcf8fc5eea3519bef4e010098e78e89d.tar.xz abrt-f8196efffcf8fc5eea3519bef4e010098e78e89d.zip |
src/Hooks/CCpp.cpp: clarify error message
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | src/Hooks/CCpp.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp index 3ab8f406..81cd77a3 100644 --- a/src/Hooks/CCpp.cpp +++ b/src/Hooks/CCpp.cpp @@ -164,22 +164,20 @@ int main(int argc, char** argv) try { - char* executable; - char* cmdline; - executable = get_executable(pid); - cmdline = get_cmdline(pid); - if (executable == NULL || cmdline == NULL) + char* executable = get_executable(pid); + if (executable == NULL) { - error_msg_and_die("can not get proc info for pid %u", (int)pid); + error_msg_and_die("can't read /proc/%u/exe link", (int)pid); } if (strstr(executable, "/abrt")) { /* free(executable); - why bother? */ - /* free(cmdline); */ error_msg_and_die("pid %u is '%s', not dumping it to avoid abrt recursion", (int)pid, executable); } + char* cmdline = get_cmdline(pid); /* never NULL */ + char path[PATH_MAX]; snprintf(path, sizeof(path), "%s/ccpp-%ld-%u", dddir, (long)time(NULL), (int)pid); |