X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsafe-write.h;h=ae186572cd611a6cd48317c3db425552ccacb260;hb=refs%2Fheads%2Fmaster;hp=185f660301c2091a07a6161a3f345c18b9f79d2a;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git
diff --git a/lib/safe-write.h b/lib/safe-write.h
index 185f66030..ae186572c 100644
--- a/lib/safe-write.h
+++ b/lib/safe-write.h
@@ -1,5 +1,5 @@
/* An interface to write() that retries after interrupts.
- Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2014 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: Mac OS 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 write() that handles EINTR. */
+
#include
#define SAFE_WRITE_ERROR ((size_t) -1)