diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-05-16 11:58:18 +0200 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-05-16 11:58:18 +0200 |
commit | fe8ca6b0f3d19e9c6fee2ade44d5e0f5a0258338 (patch) | |
tree | f56207881b8d1c2c9d6f3ebf0dd7ee5ba84d5b9a /src/lib | |
parent | 6a4b8c08c973b3fe9d3e642d7b38fcbc14c551e1 (diff) | |
download | abrt-fe8ca6b0f3d19e9c6fee2ade44d5e0f5a0258338.tar.gz abrt-fe8ca6b0f3d19e9c6fee2ade44d5e0f5a0258338.tar.xz abrt-fe8ca6b0f3d19e9c6fee2ade44d5e0f5a0258338.zip |
fixed copyright text
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/report.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/lib/report.c b/src/lib/report.c index cb921fa1..2f7dd0fd 100644 --- a/src/lib/report.c +++ b/src/lib/report.c @@ -1,6 +1,6 @@ /* - Copyright (C) 2009 Zdenek Prikryl (zprikryl@redhat.com) - Copyright (C) 2009 RedHat inc. + Copyright (C) 2011 ABRT Team + Copyright (C) 2011 RedHat inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -42,6 +42,34 @@ int analyze_and_report_dir(const char* dirname) execlp("bug-reporting-wizard", "bug-reporting-wizard", "--", dirname, NULL); perror_msg_and_die("Can't execute %s", "bug-reporting-wizard"); } + else if(pid > 0) + { + int status = 0; + pid_t p = waitpid(pid, &status, WUNTRACED); + if(p == -1) + { + error_msg("can't waitpid"); + return EXIT_FAILURE; + } + if (WIFEXITED(status)) + { + VERB2 log("reporting finished with exitcode: status=%d\n", WEXITSTATUS(status)); + return WEXITSTATUS(status); + } + else if (WIFSIGNALED(status)) + { + VERB2 log("reporting killed by signal %d\n", WTERMSIG(status)); + } + else if (WIFSTOPPED(status)) + { + /* should parent continue when the reporting is stopped??*/ + VERB2 log("reporting stopped by signal %d\n", WSTOPSIG(status)); + } + else if (WIFCONTINUED(status)) + { + VERB2 log("continued\n"); + } + } return 0; } |