I am trying to write a server program and a client program that can communicate with eachother. I am trying to use the select() system call to be able to read from the terminal as well. I have tracked the point of crashing to the following lines of code, but can't figure out what the problem is:
The program crashes with a "bus error" even with the code that uses select() commented out. Furthermore, if I comment out all of the above lines, the program runs fine. I have included the necessary header files. Any clues as to what is going on? Thanks.
fd_set readset, temp_readset;
//Problem RIGHT HERE:
temp_readset = readset;