aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-16 16:49:39 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-16 16:49:39 +0000
commitfbdd08b8c2c2a82d95ecb07673d429335d7af3c2 (patch)
tree53acf41c0e85ea3c51eaf18b448d5cc2ac61f0c0 /thread_pthread.c
parenta66a9fbb10608bc81fb466d1ad57805ce1134b7e (diff)
downloadruby-fbdd08b8c2c2a82d95ecb07673d429335d7af3c2.tar.gz
* thread_pthread.c (rb_thread_create_timer_thread): Show error
message instead of error number. * cont.c (fiber_machine_stack_alloc): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 3911f8fcff..10ef8daab3 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1470,7 +1470,7 @@ rb_thread_create_timer_thread(void)
err = pthread_attr_init(&attr);
if (err != 0) {
- fprintf(stderr, "[FATAL] Failed to initialize pthread attr(errno: %d)\n", err);
+ fprintf(stderr, "[FATAL] Failed to initialize pthread attr: %s\n", strerror(err));
exit(EXIT_FAILURE);
}
# ifdef PTHREAD_STACK_MIN
@@ -1503,7 +1503,7 @@ rb_thread_create_timer_thread(void)
err = pthread_create(&timer_thread_id, NULL, thread_timer, &GET_VM()->gvl);
#endif
if (err != 0) {
- fprintf(stderr, "[FATAL] Failed to create timer thread (errno: %d)\n", err);
+ fprintf(stderr, "[FATAL] Failed to create timer thread: %s\n", strerror(err));
exit(EXIT_FAILURE);
}
#ifdef HAVE_PTHREAD_ATTR_INIT