GNOME Bugzilla – Bug 790958
Add SIGWINCH to posix.vapi
Last modified: 2017-11-30 17:05:09 UTC
Created attachment 364589 [details] [review] Add SIGWINCH to posix.vapi This patch also adds Valadoc documentation for the signals in posix.vapi The documentation is based on the Open Group documentation for signal.h (http://pubs.opengroup.org/onlinepubs/7908799/xsh/signal.h.html) and the header bits/signum.h in GNU's libc version 2.22.
Those seem to be missing currently: #define SIGCLD SIGCHLD /* Old System V name */ #define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ #define SIGPWR 30 /* Power failure imminent. */ #define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ (Maybe) the full list for comparison: #define SIGABRT 6 /* Abnormal termination. */ #define SIGALRM 14 /* Alarm clock. */ #define SIGBUS 10 /* Bus error. */ #define SIGCHLD 20 /* Child terminated or stopped. */ #define SIGCLD SIGCHLD /* Old System V name */ #define SIGCONT 19 /* Continue. */ #define SIGFPE 8 /* Erroneous arithmetic operation. */ #define SIGHUP 1 /* Hangup. */ #define SIGILL 4 /* Illegal instruction. */ #define SIGINT 2 /* Interactive attention signal. */ #define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ #define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ #define SIGKILL 9 /* Killed. */ #define SIGPIPE 13 /* Broken pipe. */ #define SIGPOLL 23 /* Pollable event occurred (System V). */ #define SIGPROF 27 /* Profiling timer expired. */ #define SIGPWR 30 /* Power failure imminent. */ #define SIGQUIT 3 /* Quit. */ #define SIGSEGV 11 /* Invalid access to storage. */ #define SIGSTKFLT 16 /* Stack fault (obsolete). */ #define SIGSTOP 17 /* Stop, unblockable. */ #define SIGSYS 12 /* Bad system call. */ #define SIGTERM 15 /* Termination request. */ #define SIGTRAP 5 /* Trace/breakpoint trap. */ #define SIGTSTP 18 /* Keyboard stop. */ #define SIGTTIN 21 /* Background read from control terminal. */ #define SIGTTOU 22 /* Background write to control terminal. */ #define SIGURG 16 /* Urgent data is available at a socket. */ #define SIGUSR1 30 /* User-defined signal 1. */ #define SIGUSR2 31 /* User-defined signal 2. */ #define SIGVTALRM 26 /* Virtual timer expired. */ #define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ #define SIGXCPU 24 /* CPU time limit exceeded. */ #define SIGXFSZ 25 /* File size limit exceeded. */
(In reply to Rico Tzschichholz from comment #1) > Those seem to be missing currently: I did see there were some others missing, but I decided not to include them for the following reasons: > #define SIGCLD SIGCHLD /* Old System V name */ SIGCLD is an alias for SIGCHLD > #define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ SIGIO is an alias for SIGPOLL > #define SIGPWR 30 /* Power failure imminent. */ The Linux man page (man 7 signal) states "SIGPWR (which is not specified in POSIX.1-2001) is typically ignored by default on those other UNIX systems where it appears" So it seems to be a deprecated signal now. > #define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). This is the one in my patch.
Created attachment 364636 [details] [review] Move signal constants in posix.vapi to a Vala enum and add SIGWINCH Moving the constants to an enum groups the signal constants together. This improves discoverability and the readability of the documentation from valadoc.
Created attachment 364638 [details] [review] Move signal constants in posix.vapi to a Vala enum and add some more signals This patch adds signal constants for: CLD, EMT, INFO, IO, LOST, PWR, WINCH Also fixes indent, fixed has_type_id, uses "vala-0.40" as deprecated_since designation and removes the SIG prefix from the Vala enum values.
Created attachment 364640 [details] [review] Move signal constants in posix.vapi to a Vala enum and add some more signals Vala enum values are now sorted alphabetically