Using less in environment without controlling tty

Rich Felker dalias at aerifal.cx
Mon Aug 5 00:29:56 UTC 2013


On Wed, Jul 31, 2013 at 10:06:09PM +0200, Harald Becker wrote:
> Hi Rich !
> 
> On 31-07-2013 15:35 Rich Felker <dalias at aerifal.cx> wrote:
> 
> >Then try:
> >
> >cmd | setsid sh -c 'exec >/dev/tty12 2>&1 ; exec less'
> 
> NO! ... the cmd itself does fork, exec sh -c COMMAND, and pipe
> the data into stdin of the forked COMMAND. That is, after fork
> the first program is sh, so you can't use setsid as part of the
> COMMAND you give.
> 
> And NO again! I do not want to create a controlling tty for less!
> I just want to use less a given tty without this tty becoming a
> controlling tty. As it is possible with standard less.

For what it's worth, I agree that busybox less should not preclude
this usage by doing things it doesn't need to do. I was just trying to
suggest a solution that might work for you.

Rich


More information about the busybox mailing list