pgsql: Fix saving and restoring umask

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix saving and restoring umask
Date: 2017-09-23 14:16:04
Message-ID: E1dvlDw-0002sA-V0@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix saving and restoring umask

In two cases, we set a different umask for some piece of code and
restore it afterwards. But if the contained code errors out, the umask
is not restored. So add TRY/CATCH blocks to fix that.

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e0f5710c5e8b9502ac8bcd821d3418053ed38f7a

Modified Files
--------------
src/backend/commands/copy.c | 11 ++++++++++-
src/backend/libpq/be-fsstubs.c | 13 +++++++++++--
2 files changed, 21 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-09-23 14:17:26 Re: pgsql: Fix saving and restoring umask
Previous Message Alvaro Herrera 2017-09-23 12:18:41 pgsql: Test BRIN autosummarization