1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

show errno on FiberError ref #8711

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2013-07-31 08:59:25 +00:00
parent 867876ab9b
commit 37c05ec3ed

3
cont.c
View file

@ -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 */