AW: Using less in environment without controlling tty

dietmar.schindler at dietmar.schindler at
Tue Jul 30 06:33:53 UTC 2013

> Von: busybox-bounces at Im Auftrag von Denys Vlasenko
> Gesendet: Montag, 29. Juli 2013 16:10
> An: Harald Becker
> Cc: busybox
> Betreff: Re: Using less in environment without controlling tty
> On Mon, Jul 29, 2013 at 3:37 PM, Harald Becker <ralda at> wrote:
> >>We can try to use stdout, I suppose, but there are problems.
> >>Currently we set kbd_fd to nonblocking mode, for very good
> >>reasons (we don't want to block waiting for keyboard input).
> >
> > Why do we need nonblocking I/O in less?
> ...
> > The confusion only occurs, when less dies without restoring
> > settings ... which is a known issue, with all kinds of trouble.
> > Usually you need to do a tty reset, before you can continue
> > normal work, in that case. ... but this is a failure in restore
> > before exit.
> Exactly. Stdout can be messed up on exit.
> Need to weight the possibility of less messing up stdout
> against the possibility that ctty is not available.

... or desirable.
To do my little bit to weighing up: I consider it as reasonable to read interactive input of "less" from fileno(stdout) (when it isatty).

Best regards,
Dietmar Schindler
manroland web systems GmbH -- Managing Director: Eckhard Hoerner-Marass
Registered Office: Augsburg -- Trade Register: AG Augsburg -- HRB-No. 26816 -- VAT: DE281389840

Confidentiality note:
This eMail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you have received this eMail in error, then please delete this eMail.

! Please consider your environmental responsibility before printing this eMail

More information about the busybox mailing list