title: Unusual Server behavior with sockets
body: <p>When writing my server code I have this line:</p>
  
  <pre><code>newsockfd =  accept(sockfd, (struct sockaddr *)&amp;cli_addr, &amp;clilen);
  </code></pre>
  
  <p>When I run the program I get no errors, but the program just freezes, and I put a print statement at the first line of the <code>main()</code> (so it should run before anything runs)
  but the print statement never gets executed. </p>
  
  <p>This line of code is definitely the problem because once I comment it out, my print statements work.</p>
  
  <p>What might create such bizarre behavior? <br>
  (I'm not allowed to post homework code, so unfortunately I can't post all of it)</p>