[前][次][番号順一覧][スレッド一覧]

ruby-changes:30218

From: naruse <ko1@a...>
Date: Wed, 31 Jul 2013 17:59:35 +0900 (JST)
Subject: [ruby-changes:30218] naruse:r42270 (trunk): show errno on FiberError ref #8711

naruse	2013-07-31 17:59:25 +0900 (Wed, 31 Jul 2013)

  New Revision: 42270

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42270

  Log:
    show errno on FiberError ref #8711

  Modified files:
    trunk/cont.c

Index: cont.c
===================================================================
--- cont.c	(revision 42269)
+++ cont.c	(revision 42270)
@@ -568,9 +568,10 @@ fiber_machine_stack_alloc(size_t size) https://github.com/ruby/ruby/blob/trunk/cont.c#L568
 	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 */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]