1832290 Members
1929 Online
110041 Solutions
New Discussion

using write()

 
Geoffrey Wells
Occasional Contributor

using write()

While doing a write to a socket(e.g. write( sockDesc, buf, len ), I am randomly getting a -1 return code with errno set to EINTR, meaning the write call was interrupted. Is there a way to tell what signal was received by the write call? We've tried to catch all of the signals, but that didn't work. The write call still seems to get interrupted.
1 REPLY 1
Deepak_3
Occasional Contributor

Re: using write()

Can you give some more info, probably a sample code .
You do not get a signal, if you had got a
signal then
If you set SA_RESTART flag on sigaction.
Then it would have been fine.