Using less in environment without controlling tty

Harald Becker ralda at gmx.de
Wed Jul 31 20:06:09 UTC 2013


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.

I gave a possible solution for my request, but did not get any
response on this yet.

And to make things possibly even more confusing, this has to run
in an environment without mounted /proc & /sys.

--
Harald


More information about the busybox mailing list