This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ping problem while scanf in progress


1.
int main()
{

init_all_network_interfaces();
char xxx[20];
printf("What is your name?");
scanf("%s",xxx);
.....
.....
....
.....
}


2.
int main()
{

init_all_network_interfaces();
char xxx[20];
printf("What is your name?");
......
.......
......
......


}

I am running such a program in ram mode. I am using threads and program is not ending at the end. 
I am using net packages. Everything ok. my program is also working but
Problem is this :
In 2. example there is no problem. I can ping and ping replies to me all the time.
But in 1. example while waiting entry from user with scanf I can not ping my machine. After that line (user 
enters something from keyboard and presses enter key)
again I can ping. 
Has anybody faced such a thing before?? Or I am doing something wrong???







_________________________________________________________________
Kendinizi ifade edin: giriş sayfanızı Live.com ile istediğiniz biçimde tasarlayın.
http://www.live.com/getstarted

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]