This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
serial port issue
- From: "wilson k.j" <wilson_kjacob at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org, help-gnu-utils at gnu dot org, gcc at gcc dot gnu dot org
- Cc: wilson at wsspl dot com
- Date: Sat, 30 Aug 2003 00:28:08 -0700 (PDT)
- Subject: serial port issue
Can someone tell the reason why the following code
fails, returning error
Filed to reopen
open(): Resource temporarily unavailable
....
while ( ( fd = open( "/dev/ttyS0", O_RDWR ) ) < 0
)
{
if ( errno != EINTR )
{
printf( "Filed to open\n" );
perror( "open()" );
exit( 1 );
}
}
.....
close( fd );
When I connect two PCs with serial line (rs232,
between /dev/ttyS0 and COM2(Win2k)), and run a java
application that opens a serial port connection at the
other end and just tries to read data from line.
Im using the following gcc version
gcc version 2.96 20000731 (Red Hat Linux 7.0)
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com