From owner-freebsd-hackers Fri Jun 19 04:57:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA24876 for freebsd-hackers-outgoing; Fri, 19 Jun 1998 04:57:12 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from oslo.geco-prakla.slb.com (geos01.oslo.geco-prakla.slb.com [134.32.44.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA24862 for ; Fri, 19 Jun 1998 04:57:05 -0700 (PDT) (envelope-from smoergrd@geos01.oslo.geco-prakla.slb.com) Received: from recas002.geco-prakla.slb.com (recas002 [134.32.45.92]) by oslo.geco-prakla.slb.com (8.8.8/8.6.9) with SMTP id NAA29561 for ; Fri, 19 Jun 1998 13:56:34 +0200 (MET DST) Received: by recas002.geco-prakla.slb.com (SMI-8.6/SMI-SVR4) id OAA03389; Fri, 19 Jun 1998 14:02:23 +0200 To: hackers@FreeBSD.ORG Subject: Signals in POSIX threads Organization: Schlumberger Geco-Prakla X-Disclaimer: I speak only for myself. From: smoergrd@oslo.geco-prakla.slb.com (Dag-Erling Coidan Smørgrav) Date: 19 Jun 1998 14:02:23 +0200 Message-ID: Lines: 23 X-Mailer: Gnus v5.3/Emacs 19.34 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is not strictly FreeBSD-related, but I thought I'd ask here since many of you are probably working with pthreads at some level. Is there any way to force all (or specific) signals sent to a process to be sent to a particular thread? The behaviour I'm seeing now¹ is that the signal is going to a seemingly random thread². Wether the signal handler is being installed before or after the threads are started doesn't seem to make a difference. I asked a colleague at Geco about it, and his answer was "Whatever you want to do, find a way to do it that doesn't involve signals." Not very helpful :) -- Dag-Erling Smørgrav - smoergrd@oslo.geco-prakla.slb.com ¹ My development box is a dual-CPU Sun Ultra Enterprise 450 running Solaris 2.6, or SunOS 5.6 as they insist on calling it. ² Well, actually it seems to always go to the first child thread, but that might be because it's the most active (the second child thread is, for the time being, a dummy that just sleeps for five seconds before exiting, while the main thread does nothing but wait for its children to terminate) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message