Penguin

Differences between current version and previous revision of EAGAIN.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Monday, November 4, 2002 12:50:23 pm by JohnMcPherson
Older page: version 1 Last edited on Monday, October 28, 2002 7:40:35 pm by JohnMcPherson Revert
@@ -1,3 +1,5 @@
 !!!Try Again 
  
 It is very common to get this error when your application is doing non-blocking operations on files or network sockets. For example, you can open a file/socket/fifo for reading with the O_NONBLOCK flag. If you subsequently do a read(2) call and there is no data waiting, instead of blocking and waiting until there is data ready and returning that data, the read() call will return an error (EAGAIN) to let your application know that there is no data ready and to try again later. 
+  
+Another example is if a system call failed due to insufficient resources (such as virtual memory), but it might succeed if called again. (eg fork(2) does this).