diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-01-06 09:49:17 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-01-06 09:49:17 +0000 |
commit | 4fcbe702681d161468ca7300218e2636be8382a5 (patch) | |
tree | 0cd950a8dd59265d16445c02cd83058d59d2b463 /lib/librthread | |
parent | e1b074100bf436b22906343d6b9b0502c21a5cd4 (diff) |
When suspending, check the tid of the arg, not of ourselves, doh
Diffstat (limited to 'lib/librthread')
-rw-r--r-- | lib/librthread/rthread_sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_sched.c b/lib/librthread/rthread_sched.c index 584fd64f6a2..c7a2268437e 100644 --- a/lib/librthread/rthread_sched.c +++ b/lib/librthread/rthread_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_sched.c,v 1.6 2006/01/02 20:48:04 otto Exp $ */ +/* $OpenBSD: rthread_sched.c,v 1.7 2006/01/06 09:49:16 otto Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -138,7 +138,7 @@ pthread_suspend_np(pthread_t thread) * XXX Avoid a bug in current signal handling by refusing to * suspend the main thread. */ - if (pthread_main_np() == 0) + if (thread->tid != _initial_thread.tid) if (kill(thread->tid, SIGSTOP) == -1) errn = errno; return (errn); |