[klibc] [PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
Maciej Żenczykowski
zenczykowski at gmail.com
Wed Jun 11 11:24:55 PDT 2014
I guess what I wanted to say is that it might be desirable to have the
klibc shell do some dancing (perhaps controlled by some flags, but on
by default?)
If getpid() == 1 then fork a child, continue in the child, have the
parent wait for the child to terminate, then exit
child should
setsid()
close(2)
close(1)
close(0)
open("/dev/ttyS0", O_RDONLY)
open("/dev/ttyS0", O_WRONLY|O_NOCTTY)
open("/dev/ttyS0", O_WRONLY|O_NOCTTY)
And /dev/ttyS0 should either be /dev/console or specified on
commandline, or parsed out of kernel command line console= string.
Just loose ideas.
More information about the klibc
mailing list