diff options
author | Pavan Deolasee | 2016-04-12 12:53:52 +0000 |
---|---|---|
committer | Pavan Deolasee | 2016-10-18 10:05:05 +0000 |
commit | 02a8860fa81810e40e93dc9d174a15137404eb5d (patch) | |
tree | e03ea242f6db32d527dce0d6fc91e1750a0445e5 | |
parent | cb677f9f7594df50837295774aad4e8d24ece163 (diff) |
Check for 'status' and not return value of waitpid() function
-rw-r--r-- | contrib/pgxc_ctl/do_shell.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/pgxc_ctl/do_shell.c b/contrib/pgxc_ctl/do_shell.c index 8c112651fc..5165ef3564 100644 --- a/contrib/pgxc_ctl/do_shell.c +++ b/contrib/pgxc_ctl/do_shell.c @@ -467,10 +467,9 @@ int doCmdList(cmdList_t *cmds) { if (cmds->cmds[ii]->pid) { - int rc_new; - - rc_new = waitpid(cmds->cmds[ii]->pid, &status, 0); - rc = WEXITSTATUS(rc_new); + int pid; + pid = waitpid(cmds->cmds[ii]->pid, &status, 0); + rc = WEXITSTATUS(status); } } cmds->cmds[ii]->pid = 0; |