X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsafe-read.h;h=7174de7e125945c03de0754c88f13628195b8bb4;hb=cea318a913148d825c03a4e45f4553e4cb4e2880;hp=1f15b0182627512c74131b088b99f7187a3b5b57;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/lib/safe-read.h b/lib/safe-read.h index 1f15b0182..7174de7e1 100644 --- a/lib/safe-read.h +++ b/lib/safe-read.h @@ -1,5 +1,5 @@ /* An interface to read() that retries after interrupts. - Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc. + Copyright (C) 2002, 2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,6 +14,19 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +/* Some system calls may be interrupted and fail with errno = EINTR in the + following situations: + - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user + types Ctrl-Z) on some platforms: MacOS X. + - The process receives a signal for which a signal handler was installed + with sigaction() with an sa_flags field that does not contain + SA_RESTART. + - The process receives a signal for which a signal handler was installed + with signal() and for which no call to siginterrupt(sig,0) was done, + on some platforms: AIX, HP-UX, IRIX, OSF/1, Solaris. + + This module provides a wrapper around read() that handles EINTR. */ + #include #ifdef __cplusplus