title: Which system calls can return EINTR or EAGAIN error codes?
body: <p>Which of the following system calls can return EINTR or EAGAIN/EWOULDBLOCK?</p>
  
  <pre><code>getsockname()
  chdir()
  bind()
  fcntl()
  listen()
  setsid()
  setsockopt()
  socket()
  stat()
  unlink()
  access()
  accept()
  open()
  usleep()
  dup2()
  fork()
  waitpid()
  wait()
  read()
  write()
  </code></pre>
  
  <p>Some of these system calls return EINTR or EAGAIN on error (by the API of man pages).</p>
  
  <p>Also some system calls exist that the API do not refer the EINTR/EAGAIN and however return these.</p>
  
  <p>Please help.</p>