Re: less(1): refreshing file of size 0 results in file being treated as a pipe

2021-08-07 Thread Ingo Schwarze
Hi, thank you for reporting this bug and for providing a patch to fix it. I just committed your patch. Also thanks to tb@ and deraadt@ for cross-checking the patch. Yours, Ingo user wrote on Thu, Aug 05, 2021 at 12:43:21AM -0500: > Oops, forgot that OpenBSD doesn't have ! capability in

Re: less(1): refreshing file of size 0 results in file being treated as a pipe

2021-08-06 Thread Theo de Raadt
OK deraadt Ingo Schwarze wrote: > Hi, > > after quite some head-scratching, i consider the following bug report > legitimate: > > user wrote on Thu, Aug 05, 2021 at 12:43:21AM -0500: > > On Thu, Aug 05, 2021 at 12:37:00AM -0500, user wrote: > >> On Fri, Jul 23, 2021 at 11:15:59AM -0500, user

Re: less(1): refreshing file of size 0 results in file being treated as a pipe

2021-08-06 Thread Theo Buehler
> Any developer willing to provide an OK? ok tb

Re: less(1): refreshing file of size 0 results in file being treated as a pipe

2021-08-06 Thread Ingo Schwarze
Hi, after quite some head-scratching, i consider the following bug report legitimate: user wrote on Thu, Aug 05, 2021 at 12:43:21AM -0500: > On Thu, Aug 05, 2021 at 12:37:00AM -0500, user wrote: >> On Fri, Jul 23, 2021 at 11:15:59AM -0500, user wrote: >>> Less contains a hack to force files of

Re: less(1): refreshing file of size 0 results in file being treated as a pipe

2021-08-05 Thread user
Oops, forgot that OpenBSD doesn't have ! capability in less. Instead of !echo a > % and !echo b > %, run $ echo a > /tmp/test Press h and q in less to reload the file $ echo b > /tmp/test Press h and q in less to reload the file On Thu, Aug 05, 2021 at 12:37:00AM -0500, user wrote: > Bug

Re: less(1): refreshing file of size 0 results in file being treated as a pipe

2021-08-05 Thread user
Bug Reproduction: $ touch /tmp/test $ less /tmp/test Press r Run !echo a > % Run !echo b > % Output: a b On Fri, Jul 23, 2021 at 11:15:59AM -0500, user wrote: > Less contains a hack to force files of size 0 to become non-seekable in order > to workaround a linux kernel bug. > > When the file