summaryrefslogtreecommitdiffstats
path: root/src/CLI/run-command.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-21 15:49:01 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-21 15:49:01 +0200
commitf824969d3a8e77a41dac30997b47a0268cc01cbd (patch)
treec697007457916aa99f20954a4cbb0add5d6d1b82 /src/CLI/run-command.cpp
parent6c8c8f960302d9e94a820c82eeb41b3f19af2ec1 (diff)
downloadabrt-f824969d3a8e77a41dac30997b47a0268cc01cbd.tar.gz
abrt-f824969d3a8e77a41dac30997b47a0268cc01cbd.tar.xz
abrt-f824969d3a8e77a41dac30997b47a0268cc01cbd.zip
fix warning and whitespace damage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/CLI/run-command.cpp')
-rw-r--r--src/CLI/run-command.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/CLI/run-command.cpp b/src/CLI/run-command.cpp
index df29b0e1..80184cfa 100644
--- a/src/CLI/run-command.cpp
+++ b/src/CLI/run-command.cpp
@@ -23,7 +23,7 @@
http://git.kernel.org/?p=git/git.git;a=blob;f=run-command.c;hb=HEAD
*/
-struct child_process
+struct child_process
{
const char **argv;
pid_t pid;
@@ -51,28 +51,28 @@ static int finish_command(struct child_process *cmd)
int status, code = -1;
while ((waiting = waitpid(cmd->pid, &status, 0)) < 0 && errno == EINTR)
; /* nothing */
-
- if (waiting < 0)
+
+ if (waiting < 0)
error_msg_and_die("waitpid for %s failed: %s", cmd->argv[0], strerror(errno));
- else if (waiting != cmd->pid)
+ else if (waiting != cmd->pid)
error_msg_and_die("waitpid is confused (%s)", cmd->argv[0]);
- else if (WIFSIGNALED(status))
+ else if (WIFSIGNALED(status))
{
code = WTERMSIG(status);
error_msg("%s died of signal %d", cmd->argv[0], code);
- }
- else if (WIFEXITED(status))
+ }
+ else if (WIFEXITED(status))
{
code = WEXITSTATUS(status);
- if (code == 127)
+ if (code == 127)
{
code = -1;
error_msg_and_die("cannot run %s: %s", cmd->argv[0], strerror(ENOENT));
}
- }
- else
+ }
+ else
error_msg_and_die("waitpid is confused (%s)", cmd->argv[0]);
-
+
return code;
}