summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-31 08:59:25 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-31 08:59:25 +0000
commit37c05ec3ed1e7566acf54ccbbf90dfb1e790539c (patch)
tree114a7b4a06194d30b9c99daa325e7a5648f1ba76
parent867876ab9bb156b9a6cd4f5cd84b042cee632492 (diff)
show errno on FiberError ref #8711
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--cont.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cont.c b/cont.c
index d16c9a5..61726f1 100644
--- a/cont.c
+++ b/cont.c
@@ -568,9 +568,10 @@ fiber_machine_stack_alloc(size_t size)
void *page;
STACK_GROW_DIR_DETECTION;
+ errno = 0;
ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, FIBER_STACK_FLAGS, -1, 0);
if (ptr == MAP_FAILED) {
- rb_raise(rb_eFiberError, "can't alloc machine stack to fiber");
+ rb_raise(rb_eFiberError, "can't alloc machine stack to fiber errno: %d", errno);
}
/* guard page setup */