From d5ceda7ce1d94af06278e28e98dbccb848e91702 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Wed, 21 Jul 2010 16:34:05 -0700 Subject: fix for bug 5882. --- src/cli_new.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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); } } -- cgit v1.2.3 From a213dd1c48581294fc967e7198d78ca270c6ae46 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Fri, 23 Jul 2010 13:17:24 -0700 Subject: allow commit hook commands to write to stdout. --- src/commit2.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/commit2.c b/src/commit2.c index e3cc3df..05b3d9d 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -368,6 +368,7 @@ main(int argc, char** argv) setenv(ENV_COMMIT_STATUS,"FAILURE",1); } struct dirent *dirp = NULL; + restore_output(); while ((dirp = readdir(dp)) != NULL) { if (strcmp(dirp->d_name, ".") != 0 && strcmp(dirp->d_name, "..") != 0) { -- cgit v1.2.3