Bug 140474

Summary: signal(3) missing reference to NSIG
Product: Documentation Reporter: Alexander Best <alexbestms>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
signal.3.patch.txt none

Description Alexander Best 2009-11-11 16:10:00 UTC
signal(3) should mention the existence NSIG and that it's assigned the highest signal number available. this note should probably also include a hint to developers that NSIG shouldn't be used to cycle through all signals, assigning them to SIG_IGN e.g.

alex
Comment 1 Alexander Best 2010-02-09 12:50:52 UTC
this patch adds a small section to signal(3) mentioning NSIG and it's purpose.

cheers.
alex
Comment 2 Alexander Best freebsd_committer freebsd_triage 2010-08-10 01:24:37 UTC
State Changed
From-To: open->closed

There is no need to add a reference to NSIG in signal(3). Signals should be 
referenced by their name. NSIG often is being misused to cycle through all 
signals in a for-loop, assigning a certain action to all 0 < signals < NSIG. 

This is considered bad style and should be avoided [1]. Thus signal(3) should 
not mention NSIG. 

Also NSIG has been depricated in 1999 and since then has not been increased in 
order to maintain compatibility with legacy software [2]. It has been replaced 
by _SIG_MAXSIG. 

[1] http://docs.freebsd.org/cgi/getmsg.cgi?fetch=310688+0+archive/2009/freebsd-hackers/20091108.freebsd-hackers 
[2] http://docs.freebsd.org/cgi/getmsg.cgi?fetch=481904+0+archive/1999/freebsd-current/19991003.freebsd-current