How to access SIGWINCH?
Garrett Wollman
wollman at hergotha.csail.mit.edu
Sun May 13 22:16:30 UTC 2018
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
More information about the freebsd-current
mailing list