From owner-freebsd-threads@FreeBSD.ORG Thu Apr 27 18:48:14 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 90B2E16A402; Thu, 27 Apr 2006 18:48:14 +0000 (UTC) (envelope-from john@drweb.com) Received: from mail.kak-sam.to (kak-sam.to [81.211.95.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B63E43D70; Thu, 27 Apr 2006 18:48:09 +0000 (GMT) (envelope-from john@drweb.com) Received: by mail.kak-sam.to (Postfix, from userid 1002) id 85E5D59A3; Fri, 28 Apr 2006 07:48:08 +1300 (TOT) Received: from hq.kak-sam.to (unknown [84.242.6.177]) by mail.kak-sam.to (Postfix) with ESMTP id 350985994; Fri, 28 Apr 2006 07:48:07 +1300 (TOT) Received: from amd64.home (amd64.home [192.168.0.222]) by hq.kak-sam.to (Postfix) with ESMTP id AF9CF15227; Thu, 27 Apr 2006 22:48:06 +0400 (MSD) Received: by amd64.home (Postfix, from userid 1000) id 9F6B04029FE0; Thu, 27 Apr 2006 22:48:06 +0400 (MSD) From: eugeny gladkih To: Daniel Eischen Organization: Doctor Web, Ltd. References: <200604271700.k3RH0Yp2063767@freefall.freebsd.org> X-Comment-To: Daniel Eischen Date: Thu, 27 Apr 2006 22:48:06 +0400 In-Reply-To: (Daniel Eischen's message of "Thu, 27 Apr 2006 14:29:22 -0400 (EDT)") Message-ID: <8764kusvmh.fsf@amd64.home> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on kak-sam.to X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 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 List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 18:48:14 -0000 >>>>> "DE" == Daniel Eischen writes: 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? :( DE> Why so stupid programs be written to expect non-portable and DE> non-POSIX behavior? DE> Seriously, go read the POSIX spec. Then try your assumptions DE> on Solaris where it exhibits the same behavior as FreeBSD DE> with regard to SIGWINCH (or any other ignored signal). no, Solaris & Linux go the right way, this code are used on them both, and AIX, too. and even FreeBSD 4.x and 5.X with libc_r. your comments? -- Yours sincerely, Eugeny. Doctor Web, Ltd. http://www.drweb.com