Skip to content

Commit 7df1571

Browse files
authored
Merge pull request #6779 from tautschnig/bugfixes/exit-code
run: return interpreted exit code
2 parents b76cce8 + e02f4da commit 7df1571

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/run.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,8 @@ int run(
570570
while((ch=fgetc(stream))!=EOF)
571571
std_output << (unsigned char)ch;
572572

573-
return pclose(stream);
573+
int result = pclose(stream);
574+
return WEXITSTATUS(result);
574575
}
575576
else
576577
return -1;

0 commit comments

Comments
 (0)