ex/vi 100% CPU when STDIN_FILENO set to O_NONBLOCK

2022-12-11 Thread Jeremy Mates
... 42136 ex RET read -1 errno 35 Resource temporarily unavailable 42136 ex CALL read(0,0x3d94b585400,0xff) 42136 ex RET read -1 errno 35 Resource temporarily unavailable 42136 ex CALL read(0,0x3d94b585400,0xff) ... this condition can be

Re: ex/vi 100% CPU when STDIN_FILENO set to O_NONBLOCK

2022-12-12 Thread Claudio Jeker
On Sun, Dec 11, 2022 at 04:10:41PM -0800, Jeremy Mates wrote: > ... > 42136 ex RET read -1 errno 35 Resource temporarily unavailable > 42136 ex CALL read(0,0x3d94b585400,0xff) > 42136 ex RET read -1 errno 35 Resource temporarily unavailable > 42136 ex

Re: ex/vi 100% CPU when STDIN_FILENO set to O_NONBLOCK

2022-12-12 Thread Jeremy Mates
On 2022-12-12 10:01:05 +0100, Claudio Jeker wrote: > I think this is the wrong way around. The callers need to be fixed to pass > a blocking stdin to programs since that is what every unix utility > expects. What you propose it to fix every unix utility to have such a check > at the start of main.

Re: ex/vi 100% CPU when STDIN_FILENO set to O_NONBLOCK

2022-12-12 Thread Theo de Raadt
Claudio Jeker wrote: > I think this is the wrong way around. The callers need to be fixed to pass > a blocking stdin to programs since that is what every unix utility > expects. What you propose it to fix every unix utility to have such a check > at the start of main. Sorry but no. That's right.