pg_upgrade.diff

text/x-diff

Filename: pg_upgrade.diff
Type: text/x-diff
Part: 0
Message: pg_upgrade and system() return value

Patch

Format: unified
File+
contrib/pg_upgrade/exec.c 0 0
diff --git a/contrib/pg_upgrade/exec.c b/contrib/pg_upgrade/exec.c
new file mode 100644
index e326a10..2b3c203
*** a/contrib/pg_upgrade/exec.c
--- b/contrib/pg_upgrade/exec.c
*************** exec_prog(const char *log_file, const ch
*** 99,104 ****
--- 99,106 ----
  	fclose(log);
  
  	result = system(cmd);
+ 	if (result != -1)
+ 		result = WEXITSTATUS(result);
  
  	umask(old_umask);