<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Stephen Croll wrote:
<blockquote cite="mid:470F4C5D.1060504@airmail.net" type="cite">Miles
Sabin wrote:
  <br>
  <blockquote type="cite">Try losing the shutdowns ... you just need to
close.
    <br>
  </blockquote>
  <br>
Yes. Definitely lose the shutdowns.  The close() function decrements
the descriptor's reference count.  The socket is really only terminated
when the reference count goes to zero.  Shutdown, on the other hand,
will terminate the socket no matter what the reference count is.
  <br>
  <br>
In your case, shutdown causes the parent to terminate the child's
socket and vice-versa.  The sockets and corresponding file descriptors
are no longer valid.
  <br>
--
  <br>
Steve Croll
  <br>
  <br>
</blockquote>
Got it ... that fixes the problem for both SOCK_DGRAM and SOCK_STREAM
... thanks everybody I knew I was being thick somewhere!<br>
<br>
<div class="moz-signature">-- <br>
<title>Signature</title>
<div class="Section1">
<table class="MsoNormalTable" style="width: 100%;" border="0"
 cellpadding="0" width="100%">
  <tbody>
    <tr style="">
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">Howard Wilkinson</p>
      </td>
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">Phone:</p>
      </td>
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">+44(20)76907075</p>
      </td>
    </tr>
    <tr style="">
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">Coherent Technology Limited</p>
      </td>
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">Fax:</p>
      </td>
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal"> </p>
      </td>
    </tr>
    <tr style="">
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">23 Northampton Square,</p>
      </td>
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">Mobile:</p>
      </td>
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">+44(7980)639379</p>
      </td>
    </tr>
    <tr style="">
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">United Kingdom, EC1V 0HL</p>
      </td>
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal">Email:</p>
      </td>
      <td style="padding: 1.5pt;" valign="top">
      <p class="MsoNormal"><a name="howardcohtech.com"></a><a class="moz-txt-link-abbreviated" href="mailto:howard@cohtech.com">howard@cohtech.com</a></p>
      </td>
    </tr>
  </tbody>
</table>
<p class="MsoNormal"> </p>
</div>
</div>
</body>
</html>