Re: How to access SIGWINCH?

From: Garrett Wollman <wollman_at_hergotha.csail.mit.edu>
Date: Sun, 13 May 2018 18:16:28 -0400 (EDT)
In article <20180513201344.GA34676_at_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
Received on Sun May 13 2018 - 20:16:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:16 UTC