From owner-freebsd-current@freebsd.org Sun May 13 22:16:30 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 416AAFD6E5E for ; Sun, 13 May 2018 22:16:30 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (wollman-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:ccb::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D55AA76C91 for ; Sun, 13 May 2018 22:16:29 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.15.2/8.15.2) with ESMTP id w4DMGSvE036743 for ; Sun, 13 May 2018 18:16:28 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.15.2/8.14.4/Submit) id w4DMGSmb036742; Sun, 13 May 2018 18:16:28 -0400 (EDT) (envelope-from wollman) Date: Sun, 13 May 2018 18:16:28 -0400 (EDT) From: Garrett Wollman Message-Id: <201805132216.w4DMGSmb036742@hergotha.csail.mit.edu> To: freebsd-current@freebsd.org Subject: Re: How to access SIGWINCH? In-Reply-To: <20180513201344.GA34676@ptrace.hagen.corp> References: <20180513201344.GA34676@ptrace.hagen.corp> Organization: none Cc: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (hergotha.csail.mit.edu [127.0.0.1]); Sun, 13 May 2018 18:16:28 -0400 (EDT) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hergotha.csail.mit.edu X-Mailman-Approved-At: Mon, 14 May 2018 01:28:43 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2018 22:16:30 -0000 In article <20180513201344.GA34676@ptrace.hagen.corp> you write: >I'm wondering how to get access to to the SIGWINCH signal. It is defined in >/usr/include/sys/signal.h and behind the -D__BSD_VISIBLE switch. > >I can compile my code with this switch, but is this the proper way to do it? >I would expect something like this behind -D_BSD_SOURCE or >-D_XOPEN_SOURCE=700. > >What's the right way to access this signal? The right way is to *not* request strict adherence to a standard that doesn't include that signal. Do not define any of these macros and you will get SIGWINCH defined. The next POSIX revision will probably include SIGWINCH, so come 2022 you can define _POSIX_C_SOURCE to something like 202207 and get it. (I'm not actually certain when the next revision is planned to be released -- we just went through an IEEE-mandated reaffirmation cycle but I don't believe a new signal and the related data structures can be introduced in a technical corrigendum so it will have to wait for the next opportunity to do a full revision of standard, which will have to be agreed upon by IEEE, ISO/IEC JTC1, and The Open Group.) -GAWollman