aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuildbuffers.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-11-15 15:35:37 +0100
committerPeter Eisentraut <peter@eisentraut.org>2022-11-15 15:36:51 +0100
commit2fe3bdbd691a5d11626308e7d660440be6c210c8 (patch)
tree2e06bab0637373787d629086a752d0d2408d63ba /src/backend/access/gist/gistbuildbuffers.c
parentb7f3981756d314d32cca27b5c3d31bdd58b6ff06 (diff)
downloadpostgresql-2fe3bdbd691a5d11626308e7d660440be6c210c8.tar.gz
postgresql-2fe3bdbd691a5d11626308e7d660440be6c210c8.zip
Check return value of pclose() correctly
Some callers didn't check the return value of pclose() or ClosePipeStream() correctly. Either they didn't check it at all or they treated it like the return of fclose(). The correct way is to first check whether the return value is -1, and then report errno, and then check the return value like a result from system(), for which we already have wait_result_to_str() to make it simpler. To make this more compact, expand wait_result_to_str() to also handle -1 explicitly. Reviewed-by: Ankit Kumar Pandey <itsankitkp@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/8cd9fb02-bc26-65f1-a809-b1cb360eef73@enterprisedb.com
Diffstat (limited to 'src/backend/access/gist/gistbuildbuffers.c')
0 files changed, 0 insertions, 0 deletions