title: How to know if a Linux system call is restartable or not?
body: <p>Some system calls can be restarted transparently by the Kernel if the <code>SA_RESTART</code> flag is used when installing the signal handler, according to man <a href="http://www.kernel.org/doc/man-pages/online/pages/man7/signal.7.html" rel="noreferrer">signal(7)</a>:</p>
  
  <blockquote>
    <p>If a blocked call to one of the following interfaces is interrupted
    by a signal handler, <strong>then the call will be automatically  restarted 
    after  the  signal
           handler returns if the SA_RESTART flag was used</strong>; otherwise the call will fail with the error EINTR:</p>
  </blockquote>
  
  <p>Then it mentions some system calls that can (and can not) be restarted, but does not mention <code>close()</code> in either places, how would I know if <code>close()</code>, or any other function, is restartable or not ? does <code>POSIX</code> specify it or is it a Linux-specific behaviour ? where can I find more info ?</p>