title: linux fcntl - unsetting flag
body: <p>How do i unset a already set flag using fcntl?</p>
  
  <p>For e.g. I can set the socket to nonblocking mode using </p>
  
  <pre><code>fcntl(sockfd, F_SETFL, flags | O_NONBLOCK)
  </code></pre>
  
  <p>Now, i want to unset the O_NONBLOCK flag.</p>
  
  <p>I tried fcntl(sockfd, F_SETFL, flags | ~O_NONBLOCK). It gave me error EINVAL</p>