fbsplash
Michele Sanges
michele.sanges at otomelara.it
Fri Mar 28 07:55:17 UTC 2008
Il giorno gio, 27/03/2008 alle 17.28 +0100, Denys Vlasenko ha scritto:
> O_NONBLOCK does not matter one iota if you reached EOF.
> read() will return 0 immediately, it will not block.
>
> Your code is hogging CPU, since your read() sits in a while (1) loop.
+ while(1) {
+ int nVal;
+
+ len = read(fd, buf, 255);
+ printf("after reading\n");
+ if (len == -1) {
+ DEBUG_MESSAGE("error reading the fifo");
+ break;
+ }
+ }
Can you tell me why I see the printf string only when I send a command
to the applet?
Michele
More information about the busybox
mailing list