projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28b296d
)
Handle EINTR from opendir.
author
Taylor R Campbell
<campbell@mumble.net>
Wed, 24 Nov 2010 18:29:14 +0000
(18:29 +0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Wed, 24 Nov 2010 18:29:14 +0000
(18:29 +0000)
src/microcode/uxfs.c
patch
|
blob
|
history
diff --git
a/src/microcode/uxfs.c
b/src/microcode/uxfs.c
index 459adef59baf8819fc44bfddbdcd1e9d55c00056..902d1018e658be8e02f6ce1c4bbdf12a4041a494 100644
(file)
--- a/
src/microcode/uxfs.c
+++ b/
src/microcode/uxfs.c
@@
-602,9
+602,11
@@
OS_directory_valid_p (unsigned int index)
unsigned int
OS_directory_open (const char * name)
{
- DIR * pointer = (opendir (name));
- if (pointer == 0)
- error_system_call (errno, syscall_opendir);
+ DIR * pointer;
+ STD_PTR_SYSTEM_CALL (syscall_opendir, pointer, (opendir (name)));
+ /* FIXME: This leaks a directory pointer if malloc or realloc fails
+ here. Avoiding this safely with a transaction is unfortunately
+ not straightforward. */
return (allocate_directory_pointer (pointer));
}