Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!ecsv24 From: ecsv24@castle.ed.ac.uk (J Bradfield) Newsgroups: comp.unix.questions Subject: Socket question Summary: sending to dead processes Message-ID: <865@castle.ed.ac.uk> Date: 27 Oct 89 17:10:01 GMT Reply-To: ecsv24@castle.ed.ac.uk (J Bradfield) Organization: Laboratory for Foundations of Computer Science, Edinburgh U Lines: 22 I have a problem understanding the behaviour of sockets, though the answer may involve the stdio library instead. On Suns or Pyramids, consider the following sequence of events: Server Process Client Process listen's on a TCP port accept's connect's to server fdopen's socket & setbuf's to fdopen's socket unbuffered receives data (fscanf etc) and sends data (fprintf etc) and rewind's rewind's sends data receives data getc's on the socket stream process receives signal and signal handler exits. putc's one character on socket stream returns without error putc's one character again returns error indication Why does the server process get an error on the second putc, not the first?