Skip to content

Commit e02f4da

Browse files
committed
run: return interpreted exit code
As already done in other variants of `run`, decode the exit status using WEXITSTATUS.
1 parent 2bf999e commit e02f4da

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)