From 63d29fefab5290dc96e0a03ff70603aefa995887 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Mon, 23 May 2011 09:45:29 +0200 Subject: Imported Upstream version 2011.05.22 --- src/pkg/runtime/linux/thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pkg/runtime/linux/thread.c') diff --git a/src/pkg/runtime/linux/thread.c b/src/pkg/runtime/linux/thread.c index 7166b0ef2..6c506236f 100644 --- a/src/pkg/runtime/linux/thread.c +++ b/src/pkg/runtime/linux/thread.c @@ -252,10 +252,10 @@ runtime·newosproc(M *m, G *g, void *stk, void (*fn)(void)) stk, m, g, fn, runtime·clone, m->id, m->tls[0], &m); } - ret = runtime·clone(flags, stk, m, g, fn); - - if(ret < 0) - *(int32*)123 = 123; + if((ret = runtime·clone(flags, stk, m, g, fn)) < 0) { + runtime·printf("runtime: failed to create new OS thread (have %d already; errno=%d)\n", runtime·mcount(), -ret); + runtime·throw("runtime.newosproc"); + } } void -- cgit v1.2.3