From owner-freebsd-threads@FreeBSD.ORG Thu Apr 27 18:29:36 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9751416A47E for ; Thu, 27 Apr 2006 18:29:36 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 163D643D4C for ; Thu, 27 Apr 2006 18:29:35 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.6/8.13.6/NETPLEX) with ESMTP id k3RITMMr017415; Thu, 27 Apr 2006 14:29:23 -0400 (EDT) Date: Thu, 27 Apr 2006 14:29:22 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: eugeny gladkih In-Reply-To: <200604271700.k3RH0Yp2063767@freefall.freebsd.org> Message-ID: References: <200604271700.k3RH0Yp2063767@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-threads@freebsd.org Subject: Re: threads/94176: KSE: sigwait doesn't recieve SIGWINCH sent by pthread_kill() or kill -WINCH X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 18:29:36 -0000 On Thu, 27 Apr 2006, eugeny gladkih wrote: > The following reply was made to PR threads/94176; it has been noted by GNATS. > > From: eugeny gladkih > To: Andriy Gapon > Cc: bug-followup@FreeBSD.org, David Xu > Subject: Re: threads/94176: KSE: sigwait doesn't recieve SIGWINCH sent by pthread_kill() or kill -WINCH > Date: Thu, 27 Apr 2006 20:50:59 +0400 > > >>>>> "AG" == Andriy Gapon writes: > > AG> David, John, > > AG> maybe it would be beneficial to the general programmer public to add > AG> something similar to the NOTES section of the following man page to our > AG> man page for sigwait: > AG> http://condor.wesleyan.edu/cgi-bin/man.cgi?section=2&topic=sigwait > > AG> Using the original example, it would mean adding something like the > AG> following code to get the desired behavior: > > AG> void dummy_handler(int signum) > AG> { > AG> return; > AG> } > > AG> void *thread(void* unused) { > AG> struct sigaction sa; > AG> sa.sa_handler = dummy_handler; > AG> sigemptyset(&sa.sa_mask); > AG> sa.sa_flags = 0; > AG> sigaction(SIGWINCH, &sa, NULL); > AG> . > AG> . > AG> . > > > why so stupid code should be presented in all software wanted > just to wait the signal? :( Why so stupid programs be written to expect non-portable and non-POSIX behavior? Seriously, go read the POSIX spec. Then try your assumptions on Solaris where it exhibits the same behavior as FreeBSD with regard to SIGWINCH (or any other ignored signal). -- DE