Non-interactive interactive shell !!

Denis Vlasenko vda.linux at googlemail.com
Mon Apr 9 13:50:18 UTC 2007


On Monday 09 April 2007 15:34, Levend Sayar wrote:
> Denis,
> 
> First of all, thanks for spending your time for me. I am so close to get
> crazy :))
> ...
> Below is the log with added trace lines you wanted (Sorry it is pretty long)
...
> KLOG: preadfd called
> KLOG: safe_read(0,..) calling

Basically it means that shell *IS* reading from stdin (fd #0).

(You may want to check that safe_read() is actually calling read(),
just to be 100 % sure:

ssize_t safe_read(int fd, void *buf, size_t count)
{
        ssize_t n;

        do {
write(2, "read...\n", 8);
                n = read(fd, buf, count);
write(2, "...read\n", 8);
        } while (n < 0 && errno == EINTR);

        return n;
}

If it indeed blocks on read() [you see "read..." but not "...read"],
you type chars, press Enter, but still no "...read",
then add readlink on /proc/self/fd/0 and print it.
Let's try to find out what is opened on fd #0...

Since you started digging in serial driver, you may also
want to check that input data from serial device
is correctly passed to the userspace by it.

I once had serial driver which simply ate all input without
passing it to the userspace!
--
vda



More information about the busybox mailing list