summaryrefslogtreecommitdiff
path: root/src/cli_new.c
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-07-21 16:34:05 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-07-21 16:34:05 -0700
commitd5ceda7ce1d94af06278e28e98dbccb848e91702 (patch)
treeff9f5bff36e9ea38f9bd7a2be8711f67ab3777ae /src/cli_new.c
parent119d2d838b52541429edf72cc88da6190a1f9389 (diff)
downloadvyatta-cfg-d5ceda7ce1d94af06278e28e98dbccb848e91702.tar.gz
vyatta-cfg-d5ceda7ce1d94af06278e28e98dbccb848e91702.zip
fix for bug 5882.
Diffstat (limited to 'src/cli_new.c')
-rw-r--r--src/cli_new.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index 19aae1c..b0535d8 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -117,8 +117,6 @@ void bye(const char *msg, ...)
fprintf(out_stream, "%s failed\n",
(cli_operation_name) ? cli_operation_name : "Operation");
- if (is_silent_msg())
- exit(-1);
va_start(ap, msg);
if (is_echo())
printf("echo \"");
@@ -2447,8 +2445,9 @@ system_out(const char *cmd, const char **outbuf)
close( cp[0]);
int ret = system(cmd);
+
close( cp[1]);
- exit(ret);
+ exit(WEXITSTATUS(ret));
}
else {
//parent
@@ -2463,6 +2462,7 @@ system_out(const char *cmd, const char **outbuf)
int status;
wait(&status);
close(cp[0]);
+
return WEXITSTATUS(status);
}
}