> >Is this the way it's supposed to work? Is this due to things that are 
> >missing from the miniroot?
> 
> No,  more is just broken.
> 
> I think it expects to be able to read from stderr

Yes, in readch():

    
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/more/more.c#1560

>  ... read from stderr (for obvious reasons :-) and exits when it cannot.

Sure, because reading from stdin won't work, if we
use "more" in a pipeline:

    ls -lR /dev | more


Since terminals typically where setup up by opening
filedescriptor 0 (stdin) in O_RDWR mode, and using
dup(2) twice to clone fd 0 to 1 (stdout) and 2(stderr),
"more" can in fact use a read on stderr to get terminal
input.


Standards also describe this feature
("The stderr stream is expected to be open for reading and writing."),
e.g. here:

    http://www.opengroup.org/onlinepubs/009695399/functions/stdin.html
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to