summaryrefslogtreecommitdiff
path: root/ext/standard/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/exec.c')
-rw-r--r--ext/standard/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 27c06793cb..5a494e664e 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -199,7 +199,7 @@ static int _Exec(int type, char *cmd, pval *array, pval *return_value)
#if HAVE_SYS_WAIT_H
if (WIFEXITED(FG(pclose_ret))) {
- ret = WEXITSTATUS(FG(pclose_ret));
+ FG(pclose_ret) = WEXITSTATUS(FG(pclose_ret));
}
#endif