Re: [PATCH s6-networking 1/1] Close a read end of a handshake notification pipe

From: Petr Vaněk <arkamar_at_atlas.cz>
Date: Tue, 30 Aug 2022 17:08:52 +0200

On Tue, Aug 30, 2022 at 11:00:03AM +0000, Laurent Bercot wrote:
> >The write end of the pipe is closed when envs are written, therefore it
> >make sense to close read end as well after envs are read. This prevents
> >fd leaking to the app.
>
> Good catch, thanks. Applied with a little modification: since close()
> can set errno, it shouldn't be called between read() and
> strerr_diefu1sys() (which reads errno).

Ah, I see, thanks!

> Not going to cut a release just for this, because the bug is minor
> (the leaked fd is completely unusable).

Makes sense, no problem at all.

Petr
Received on Tue Aug 30 2022 - 17:08:52 CEST

This archive was generated by hypermail 2.4.0 : Tue Aug 30 2022 - 17:09:23 CEST