Lars wrote:

> | Index: lyxsocket.C
> | -          fd_(lyx::support::socktools::listen(addr, MAX_CLIENTS)),
> | +          fd_(lyx::support::socktools::listen(addr, 3)),

> The use of MAX_CLIENTS here is not doing what the original author
> thinks it does. The backlog parameter is just how many _outstanding_
> non-accepted clients that are allowed to wait at the same time, not
> the number of clients allowed to access the socket server, so it is
> better to keep this number low. It could possible be lowered down to 1
> even, man listen(2).

Oh... I assure you that MAX_CLIENTS doing what I wanted it to do. Maybe you 
wanted to say that I don't know what the second argument of listen() does, 
but it amounts to the same :).

To me, it seemed that the maximum number of connections should be also a good 
guess to the backlog, that is, the number of pending connections that the 
operating system permits to the socket. Certainly 1 is not a good choice, as 
if lyx is busy it will not accept() two successive connections.

The patch seems fine to me.

Regards,
Joao.

Reply via email to