summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-11-15 16:58:16 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-11-15 16:58:16 +0100
commit46d60e990d57758c1d72ed76efdeee19e55996f1 (patch)
tree6563abd994c198d3fe699602d5a694fedbdd6e0f /src/lib
parent2cf0d770b66b6c6ce50af2767f575db552cd784c (diff)
downloadabrt-46d60e990d57758c1d72ed76efdeee19e55996f1.tar.gz
abrt-46d60e990d57758c1d72ed76efdeee19e55996f1.tar.xz
abrt-46d60e990d57758c1d72ed76efdeee19e55996f1.zip
Make "abrt-handle-crashdump -e BOGUS_EVENT" fail (also fail if asked over dbus)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/run_event.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/run_event.c b/src/lib/run_event.c
index 23517923..90b7b2f2 100644
--- a/src/lib/run_event.c
+++ b/src/lib/run_event.c
@@ -41,7 +41,7 @@ int run_event(struct run_event_state *state,
setenv("EVENT", event, 1);
/* Read, match, and execute lines from abrt_event.conf */
- int retval = 0;
+ int retval = -1;
struct dump_dir *dd = NULL;
char *line;
while ((line = xmalloc_fgetline(conffile)) != NULL)
@@ -147,13 +147,11 @@ int run_event(struct run_event_state *state,
int status;
waitpid(pid, &status, 0);
- if (status != 0)
- {
- retval = WEXITSTATUS(status);
- if (WIFSIGNALED(status))
- retval = WTERMSIG(status) + 128;
+ retval = WEXITSTATUS(status);
+ if (WIFSIGNALED(status))
+ retval = WTERMSIG(status) + 128;
+ if (retval != 0)
break;
- }
}
if (state->post_run_callback)