return the status code of the preprocessor on -E
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 1 Jun 2008 11:33:59 +0000 (11:33 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 1 Jun 2008 11:33:59 +0000 (11:33 +0000)
[r19896]

main.c

diff --git a/main.c b/main.c
index b07e08f..49f5039 100644 (file)
--- a/main.c
+++ b/main.c
@@ -201,8 +201,8 @@ static FILE *preprocess(FILE *in, const char *fname, bool to_stdout)
                puts(buf);
        }
        if(to_stdout) {
-               system(buf);
-               exit(0);
+               int res = system(buf);
+               exit(res);
        } else {
                FILE *f = popen(buf, "r");
                if(f == NULL) {