> Sample tty_idle.c source:
>
> #include <unistd.h>
>
> int main( int argc, char* argv )
> {
> close(0);
> close(1);
> close(2);
> while (1) pause();
> }
Hey Harald,
Depending on your configuration, this will not work. Because you are
doing more than you need - and in this case this might be harmful.
Closing 0, 1 and 2 will normally remove all references to the terminal
you are being executed in. Since your tty_idle program is the only user
of ttyS0 at the time it is executed, closing those fds - and thus
removing all references to ttyS0 - will make some kernels deconfigure
the serial port, and you will have gained nothing.
Don't close anything, just pause(), and you will keep the serial line
open.
--
Laurent
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox