Hi,
I'm quite new at programming in linux (and uclinux), so if I'm asking for obvious answers here, please excuse me.
Here's the situation: I'm programming an application for the Intermec CK1 handheld computer, which runs uclinux. Using some functions provided by the hardware manufacturer, I create a serial PPP connection to my host PC and start communicating with the host using streams which I created from my socket discriptor. I send and receive data using the function fputc() and fgetc().
My problem is, when the serial connection is lost for some reason (cable disconnected, for example) during communication, my calls to fputc() or fgetc() hang, locking my app. I read in the documentation of glibc (which I was given by the manufacturer, they claim it's basically the same as uclibc) that these functions should return EOf when this happens. Obviously, they don't.
My question is, is this because of uclibc? Or should the OS image for the handheld computer handle this?
I'm at a loss to solve this. I know threading may solve my problem, but as I'm just a beginner, I'd like to keep things a bit simple...
Thanks in advance!