[okl4-developer] Bug in serial input?

Andreas Rottmann a.rottmann at gmx.at
Sun Mar 7 09:46:24 EST 2010


Hi!

Running this modified hello world example in skyeye 1.3.0 RC1:

#include <stdio.h>

int
main(int argc, char** argv)
{
    char buffer[64];
    printf("Your name please: ");
    fgets(buffer, sizeof(buffer), stdin);
    printf("got: %s\n", buffer);
}
/* --- EOF hello.c --- */

... yields on my machine:

OKL4 - (provider: Open Kernel Labs) built on Mar  3 2010 20:29:39 using gcc version 3.4.4.
Your name please: got: �������������������
--- KD# User: L4 Rootserver exit ---
>

This is without any user input; it seems that `stdin' has some data
buffered, and then returns EOF. Probably this is a bug my environment --
could someone try to run this, and tell me if it works for them?

Thanks, Rotty
-- 
Andreas Rottmann -- <http://rotty.yi.org/>



More information about the Developer mailing list