I'm fairly new to the Linux/Unix programming environment and I could
sure use some help.
I'm in the middle of a project which entails porting a program from
AIX to Linux. I have finally go it to compile but the binary is
* on a system function call and I am stuck.
Here is a simplified version of the code:
char file_string = "/dev/cua1";
if ((modem = fopen(file_string,"r")) == NULL)
printf("can't open modem\n");
file_desc = fileno(modem);
printf("the file desc is %d\n", file_desc);
i = read(file_desc, buff, 1);
As you can see I am trying to get a string from a modem. The programQuote:}
is getting a valid file descriptor, but it just hangs in the
i = read(file_desc, buf,1)
statement. I have zero experience with modems(I'm learning on the fly
unfortunatly) and I would sure appreciate any help or suggestions.
I'm compiling this on RedHat 5.0, it was originally done for AIX
version 3.2 (I think)