spinrad@vega.ucsb.edu (03/23/91)
Hello Ada Wizards, I'm new to ada and to sockets so if this problem has already been dealt with, I apologize. I'm tryinng to implement an ada program which runs concurrently on 2 (or more) sun 3/60s. I've set up unix stream sockets to communicate between the programs running on different computers, and for single task ada programs, I got the sockets working perfectly. To implement the socket system calls, I used 'C' routines which I linked to ada via the INTERFACE pragmas. As I mentioned earlier, I got this part working fine for single task ada programs. But when I try to use additional ada tasks, my SEND and RECV socket system calls occasionally return with errno = EINTR - Interrupted system call In my simple test program which runs into this error I have two tasks: 1 task continually makes c interface calls which results in a SEND system call; the other task is in an infinite loop adding and subtracting a fixed amount to a variable. My guess that the EINTR is caused by a signal from the os used by ada to implement task switching. And I'm guessing that this signal occasionally arrives while one of the tasks in a socket system call. Has anybody seen something like this before, or am I in newly unexplored territory? If someone has seen this error in ada before, can you tell me if my guesses are correct, and how did you get around this problem? Any suggestions or insights would be grately appreciated. If possible I would perfer replies be sent by email instead of posted to the newsgroup. If there is a large interest I'll post a summary. And one final note, I'm using the VERDIX ada compiler on sun 3/60s. Many Thanks!!! Sandy -- Sandy Spinrad Internet: spinrad@cornu.ucsb.edu UUNET: uunet!hub.ucsb.edu!spinrad@cornu