From owner-freebsd-questions Mon Oct 23 13: 4:19 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 45B3937B4C5 for ; Mon, 23 Oct 2000 13:04:17 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e9NK4GH01459; Mon, 23 Oct 2000 13:04:16 -0700 (PDT) Date: Mon, 23 Oct 2000 13:04:16 -0700 From: Alfred Perlstein To: Flemming Froekjaer Cc: FreeBSD-questions@FreeBSD.ORG Subject: Re: SIG codes > 128 allowed? Message-ID: <20001023130415.U28123@fw.wintelcom.net> References: <641C2F90.19430A3A.0F2A144B@netscape.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <641C2F90.19430A3A.0F2A144B@netscape.net>; from froekjaerf@netscape.net on Mon, Oct 23, 2000 at 03:34:44PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Flemming Froekjaer [001023 12:35] wrote: > In signal.h, more precisely the struct __siginfo, si_code is defined as an > integer, but the same include file also defines the constant _SIG_MAXSIG, > with a value of 128. Does this mean that FreeBSD won't allow signal codes > above 128, or can you use the whole positive spectrum of an integer? > > The reason I ask is that I want to define a sighandler for every thread in a > process. As you may know, threads share the parent process' signal handlers, > so I'll need a unique signal code for each thread. I anticipate that the > number of threads per process will be about a thousand. You'll want to find a better way to dispatch to each thread than to do this. You can use pthread_kill(3) to send a signal to a particular thread. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message