serialPortSample... hang on read function

2009-02-17 Thread Boris Prohaska
Hi Guys... i hope someone can help me out here. In the serialPortSample.h on line 517 in the InitializeModem(); function there is this classic read command. But when no modem is here or the cable is unplugged, it hangs there for an infinite amount on time. My question is rather simple:

Re: serialPortSample... hang on read function

2009-02-17 Thread Sean McBride
On 2/17/09 6:52 PM, Boris Prohaska said: Hi Guys... i hope someone can help me out here. In the serialPortSample.h on line 517 in the InitializeModem(); function there is this classic read command. But when no modem is here or the cable is unplugged, it hangs there for an infinite amount on

Re: serialPortSample... hang on read function

2009-02-17 Thread Louis Demers
On 17-Feb-09, at 12:56 , Sean McBride wrote: On 2/17/09 6:52 PM, Boris Prohaska said: Hi Guys... i hope someone can help me out here. In the serialPortSample.h on line 517 in the InitializeModem(); function there is this classic read command. But when no modem is here or the cable is

Re: serialPortSample... hang on read function

2009-02-17 Thread Kyle Sluder
On Tue, Feb 17, 2009 at 12:52 PM, Boris Prohaska borisproha...@gmx.at wrote: Is there a way to find out if the cable is connected or the other way... to define a timeout, that it will return with an error? Have you tried select(2)? --Kyle Sluder ___