projects
/
platform
/
upstream
/
make.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a8a763
)
(safe_stat): New function, EINTR-safe wrapper around stat.
author
Roland McGrath
<roland@redhat.com>
Mon, 4 Jul 1994 21:46:58 +0000
(21:46 +0000)
committer
Roland McGrath
<roland@redhat.com>
Mon, 4 Jul 1994 21:46:58 +0000
(21:46 +0000)
misc.c
patch
|
blob
|
history
diff --git
a/misc.c
b/misc.c
index
06be0b2
..
b9e76b9
100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-716,3
+716,23
@@
get_path_max ()
return value;
}
#endif
+
\f
+/* On some systems, stat can return EINTR. */
+
+int
+safe_stat (name, buf)
+ char *name;
+ struct stat *buf;
+{
+ int ret;
+
+#ifdef EINTR
+ do
+#endif
+ ret = stat (name, buf);
+#ifdef EINTR
+ while (ret < 0 && errno == EINTR);
+#endif
+
+ return ret;
+}