After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790958 - Add SIGWINCH to posix.vapi
Add SIGWINCH to posix.vapi
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
0.39.x
Other All
: Normal minor
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-28 20:02 UTC by Al Thomas
Modified: 2017-11-30 17:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add SIGWINCH to posix.vapi (4.57 KB, patch)
2017-11-28 20:02 UTC, Al Thomas
none Details | Review
Move signal constants in posix.vapi to a Vala enum and add SIGWINCH (8.13 KB, patch)
2017-11-29 18:30 UTC, Al Thomas
none Details | Review
Move signal constants in posix.vapi to a Vala enum and add some more signals (8.47 KB, patch)
2017-11-29 20:20 UTC, Al Thomas
none Details | Review
Move signal constants in posix.vapi to a Vala enum and add some more signals (8.51 KB, patch)
2017-11-29 21:36 UTC, Al Thomas
committed Details | Review

Description Al Thomas 2017-11-28 20:02:05 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.
Comment 1 Rico Tzschichholz 2017-11-28 21:48:08 UTC
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.  */
Comment 2 Al Thomas 2017-11-29 00:23:59 UTC
(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.
Comment 3 Al Thomas 2017-11-29 18:30:57 UTC
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.
Comment 4 Al Thomas 2017-11-29 20:20:17 UTC
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.
Comment 5 Al Thomas 2017-11-29 21:36:20 UTC
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