bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiti


From: Samuel Thibault
Subject: Re: [RFC PATCH glibc 25/34] hurd: Improve reply port handling when exiting signal handlers
Date: Tue, 11 Apr 2023 22:15:28 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Sergey Bugaev, le mar. 11 avril 2023 10:44:17 +0300, a ecrit:
> On Tue, Apr 11, 2023 at 1:03 AM Samuel Thibault <samuel.thibault@gnu.org> 
> wrote:
> > I tend to be very cautious with reply port reuse since it can confuse
> > servers a lot when e.g. interrupted, so it's generally safer not to try
> > to reuse them.
> 
> Huh? Confuse how?

On interruption, it's hard to know whether the server will actually send
a message on the reply port or not, in the end. So if you re-use a reply
port but unfortunately the server sent a reply on it in the end, you get
all reply messages shifted.

> But I don't see a reason to destroy the *current* reply port, the one
> used during signal handling, which we're longjumping out of.

Simplicity. I agree that it should work fine as of now. But then
somebody contributes something, doesn't notice that case, breaks it and
mayhem comes, but only rarely since signals don't happen often.

> On the other hand it doesn't hurt much either, and signal handling is
> a slow path anyway, so we may just play it safe.

Yes, please :)

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]