manual: Update signal descriptions

Message ID xnsephkqlp.fsf@greed.delorie.com (mailing list archive)
State New
Headers
Series manual: Update signal descriptions |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Test passed

Commit Message

DJ Delorie Jan. 17, 2025, 10:44 p.m. UTC
  Based on auditing all the signals and source trees for Hurd and
Linux...

SIGSYS - This is not used for a bad system call (ENOSYS is used
for that).  This is used by SECCOMP and some cases where an invalid
sub-function was requested.

SIGSTKFLT - Note it used to be a coprocessor stack fault but is now
obsolete and available for general user use.

SIGLOST - Hurd only now; note that its original purpose as an NFS
lock lost signal is obsolete.

SIGPWR - Note this is for power lost *and* power restored, and is
more a user-mode signal than a kernel-generated signal.
  

Comments

Adhemerval Zanella Netto Jan. 20, 2025, 1:10 p.m. UTC | #1
On 17/01/25 19:44, DJ Delorie wrote:
> 
> Based on auditing all the signals and source trees for Hurd and
> Linux...
> 
> SIGSYS - This is not used for a bad system call (ENOSYS is used
> for that).  This is used by SECCOMP and some cases where an invalid
> sub-function was requested.
> 
> SIGSTKFLT - Note it used to be a coprocessor stack fault but is now
> obsolete and available for general user use.
> 
> SIGLOST - Hurd only now; note that its original purpose as an NFS
> lock lost signal is obsolete.
> 
> SIGPWR - Note this is for power lost *and* power restored, and is
> more a user-mode signal than a kernel-generated signal.
> 
> diff --git a/manual/signal.texi b/manual/signal.texi
> index 2012980efe..9d7f8667e5 100644
> --- a/manual/signal.texi
> +++ b/manual/signal.texi
> @@ -427,11 +427,21 @@ failure to properly emulate them.
>  
>  @deftypevr Macro int  SIGSYS
>  @standards{Unix, signal.h}
> -Bad system call; that is to say, the instruction to trap to the
> -operating system was executed, but the code number for the system call
> -to perform was invalid.
> +System call event.  This signal may be generated by a valid system
> +call which requested an invalid sub-function, and also by the SECCOMP
> +filter when it filters a system call.
> +
> +If the system call itself is invalid or unsupported by the kernel, the
> +call will not raise this signal, but will return ENOSYS.

Maybe use @code{ENOSYS} here.

> +@end deftypevr
> +
> +@deftypevr Macro int  SIGSTKFLT
> +Coprocessor stack fault.  Obsolete, no longer generated.  This signal
> +may be used by applications in much the way @code{SIGUSR1} and
> +@code{SIGUSR2} are.
>  @end deftypevr
>  
> +

Spurious new line maybe?

>  @node Termination Signals
>  @subsection Termination Signals
>  @cindex program termination signals
> @@ -752,12 +762,11 @@ that isn't connected.  @xref{Sending Data}.
>  @deftypevr Macro int SIGLOST
>  @standards{GNU, signal.h}
>  @cindex lost resource signal
> -Resource lost.  This signal is generated when you have an advisory lock
> -on an NFS file, and the NFS server reboots and forgets about your lock.
> -
> -On @gnuhurdsystems{}, @code{SIGLOST} is generated when any server program
> -dies unexpectedly.  It is usually fine to ignore the signal; whatever
> -call was made to the server that died just returns an error.
> +Resource lost.  On @gnuhurdsystems{}, @code{SIGLOST} is generated when
> +any server program dies unexpectedly.  It is usually fine to ignore
> +the signal; whatever call was made to the server that died just
> +returns an error.  This signal's original purpose of signalling a lost
> +NFS lock is obsolete.
>  @end deftypevr
>  
>  @deftypevr Macro int SIGXCPU
> @@ -817,6 +826,17 @@ to print some status information about the system and what the process
>  is doing.  Otherwise the default is to do nothing.
>  @end deftypevr
>  
> +@deftypevr Macro int SIGPWR
> +@cindex power event signal
> +Power lost or restored.  On s390x Linux systems, this signal is
> +generated when a machine check warning is issued, and is sent to the
> +process designated to receive ctrl-alt-del notificiations.  Otherwise,

s/notificiations/notifications

> +it is up to userspace applications to generate this signal and manage
> +notifications as to the type of power event that happened.
> +
> +The default action is to terminate the process.
> +@end deftypevr
> +
>  @node Signal Messages
>  @subsection Signal Messages
>  @cindex signal messages
>
  
DJ Delorie Jan. 20, 2025, 10:01 p.m. UTC | #2
Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> writes:
>> +call will not raise this signal, but will return ENOSYS.
>
> Maybe use @code{ENOSYS} here.

Fixed.

>>  @end deftypevr
>>  
>> +
>
> Spurious new line maybe?

Fixed.

>> +process designated to receive ctrl-alt-del notificiations.  Otherwise,
>
> s/notificiations/notifications

Fixed.

v2 shortly...
  

Patch

diff --git a/manual/signal.texi b/manual/signal.texi
index 2012980efe..9d7f8667e5 100644
--- a/manual/signal.texi
+++ b/manual/signal.texi
@@ -427,11 +427,21 @@  failure to properly emulate them.
 
 @deftypevr Macro int  SIGSYS
 @standards{Unix, signal.h}
-Bad system call; that is to say, the instruction to trap to the
-operating system was executed, but the code number for the system call
-to perform was invalid.
+System call event.  This signal may be generated by a valid system
+call which requested an invalid sub-function, and also by the SECCOMP
+filter when it filters a system call.
+
+If the system call itself is invalid or unsupported by the kernel, the
+call will not raise this signal, but will return ENOSYS.
+@end deftypevr
+
+@deftypevr Macro int  SIGSTKFLT
+Coprocessor stack fault.  Obsolete, no longer generated.  This signal
+may be used by applications in much the way @code{SIGUSR1} and
+@code{SIGUSR2} are.
 @end deftypevr
 
+
 @node Termination Signals
 @subsection Termination Signals
 @cindex program termination signals
@@ -752,12 +762,11 @@  that isn't connected.  @xref{Sending Data}.
 @deftypevr Macro int SIGLOST
 @standards{GNU, signal.h}
 @cindex lost resource signal
-Resource lost.  This signal is generated when you have an advisory lock
-on an NFS file, and the NFS server reboots and forgets about your lock.
-
-On @gnuhurdsystems{}, @code{SIGLOST} is generated when any server program
-dies unexpectedly.  It is usually fine to ignore the signal; whatever
-call was made to the server that died just returns an error.
+Resource lost.  On @gnuhurdsystems{}, @code{SIGLOST} is generated when
+any server program dies unexpectedly.  It is usually fine to ignore
+the signal; whatever call was made to the server that died just
+returns an error.  This signal's original purpose of signalling a lost
+NFS lock is obsolete.
 @end deftypevr
 
 @deftypevr Macro int SIGXCPU
@@ -817,6 +826,17 @@  to print some status information about the system and what the process
 is doing.  Otherwise the default is to do nothing.
 @end deftypevr
 
+@deftypevr Macro int SIGPWR
+@cindex power event signal
+Power lost or restored.  On s390x Linux systems, this signal is
+generated when a machine check warning is issued, and is sent to the
+process designated to receive ctrl-alt-del notificiations.  Otherwise,
+it is up to userspace applications to generate this signal and manage
+notifications as to the type of power event that happened.
+
+The default action is to terminate the process.
+@end deftypevr
+
 @node Signal Messages
 @subsection Signal Messages
 @cindex signal messages