Why PG_SETMASK() change errno to 0 when there is an elog() callbefore or after it? Is it a bug? - Mailing list pgsql-bugs

From CNG L
Subject Why PG_SETMASK() change errno to 0 when there is an elog() callbefore or after it? Is it a bug?
Date
Msg-id CAJ3ejTyRrZZq_Wt0aRnCQbf162SxXNuxRYhYHuhY4g9_A09jYw@mail.gmail.com
Whole thread Raw
Responses Re: Why PG_SETMASK() change errno to 0 when there is an elog() callbefore or after it? Is it a bug?  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
In founction ServerLoop() in code postmaster.c, after select(), we called PG_SETMASK(). If l add an elog() after PG_SETMASK(), I see errno is reset to 0 when PG_SETMASK() call suceeded. But the immediately code will actually check errno from the select() call which now has been overwritten by PG_SETMASK(). 

Can someone share some light on this?

Thanks
Congnan

pgsql-bugs by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: psql and readline comments
Next
From: "钱学斌"
Date:
Subject: pgsql bug