Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!rex!rouge!gator.cacs.usl.edu From: pcb@gator.cacs.usl.edu (Peter C. Bahrs) Newsgroups: comp.unix.questions Subject: Interrupt socket Message-ID: <4162@rouge.usl.edu> Date: 20 Feb 90 05:46:22 GMT Sender: anon@rouge.usl.edu Distribution: usa Organization: The Center for Advanced Computer Studies, USL Lines: 38 I received excellent information regarding socket information...here is another dilemma. I have a server with two sockets, A for normal reading and B, interrupt driven. While processing A's message, a jump to the signal handler for B occurs when a message is sent on B. Fine... But I get another interrupt when, (..I believe), the socket is closed or dissappears from the system, which causes a false accept. Below is the code fragment I used to set the interrupt stuff for B: if (setsockopt (sd->socket, SOL_SOCKET, SO_DEBUG, 0, 0) < 0) { *error = CISI; fprintf (stderr, "ciServerInit: failed on setsockopt (%ld)\n",*error); return; } /* wait for requests...system dependendent 5!!! */ listen (sd->socket,15); if (sd->func != NULL) { /* set up the interrupt stuff */ signal (SIGIO, sd->func); /* this is the void func() */ fcntl(sd->socket,F_SETFL,FASYNC); fcntl(sd->socket,F_SETOWN,getpid()); } Questions: Can I shut off the signal before the shutdown/close and re-start it? How can I ignore the system deletion of the socket interrupt? /*------------Thanks in advance...---------------------------------------+ | Peter C. Bahrs | | The USL-NASA Project | | Center For Advanced Computer Studies INET pcb@gator.cacs.sl.edu | | University of Southwestern Louisiana ...!uunet!dalsqnt!gator!pcb | | Lafayette, LA 70504 | +-----------------------------------------------------------------------*/