From nobody@FreeBSD.org  Wed Nov 11 16:02:48 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 216791065670
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Nov 2009 16:02:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id EB8708FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Nov 2009 16:02:47 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nABG2l0r077715
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Nov 2009 16:02:47 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nABG2lxv077714;
	Wed, 11 Nov 2009 16:02:47 GMT
	(envelope-from nobody)
Message-Id: <200911111602.nABG2lxv077714@www.freebsd.org>
Date: Wed, 11 Nov 2009 16:02:47 GMT
From: Alexander Best <alexbestms@wwu.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: signal(3) missing reference to NSIG
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         140474
>Category:       docs
>Synopsis:       signal(3) missing reference to NSIG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 11 16:10:00 UTC 2009
>Closed-Date:    Tue Aug 10 00:48:33 UTC 2010
>Last-Modified:  Tue Aug 10 00:48:33 UTC 2010
>Originator:     Alexander Best
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD otaku 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r199160M: Wed Nov 11 00:33:45 CET 2009     root@otaku:/usr/obj/usr/src/sys/ARUNDEL  i386
>Description:
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
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Alexander Best <alexbestms@wwu.de>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: docs/140474: signal(3) missing reference to NSIG
Date: Tue, 09 Feb 2010 13:50:52 +0100 (CET)

   This is a MIME encoded multipart message.
 
 --+permail-2010020912505280e26a0b000022ac-a_best01+
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 this patch adds a small section to signal(3) mentioning NSIG and it's purpose.
 
 cheers.
 alex
 
 --+permail-2010020912505280e26a0b000022ac-a_best01+
 Content-Type: text/plain
 Content-Transfer-Encoding: Base64
 Content-Disposition: attachment; filename="signal.3.patch.txt"
 
 SW5kZXg6IGxpYi9saWJjL2dlbi9zaWduYWwuMwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaWIvbGliYy9nZW4v
 c2lnbmFsLjMJKHJldmlzaW9uIDIwMzU1NikKKysrIGxpYi9saWJjL2dlbi9zaWduYWwuMwkod29y
 a2luZyBjb3B5KQpAQCAtMTc4LDYgKzE3OCwxMiBAQAogZnVuYygpIHJlbWFpbnMgaW5zdGFsbGVk
 IGFmdGVyIGEgc2lnbmFsIGhhcyBiZWVuIGRlbGl2ZXJlZC4KIC5FZgogLlBwCitOU0lHIGlzIGJl
 aW5nIGFzc2lnbmVkIHRoZSBoaWdoZXN0IHNpZ25hbCBudW1iZXIgYXZhaWxhYmxlLgorVW5saWtl
 IExpbnV4IFNJR1VOVVNFRCBob3dldmVyIGl0J3Mgbm90IGEgdmFsaWQgc2lnbmFsIG9mIGl0J3Mg
 b3duCithbmQgdGh1cyBtdXN0bid0IGJlIHVzZWQgYXMKKy5GYSBzaWcKK2FyZ3VtZW50LiBJbiBp
 dCdzIGN1cnJlbnQgc3RhdGUgTlNJRyBpcyBhbiBhbGlhcyBmb3IgU0lHVEhSLgorLlBwCiBGb3Ig
 c29tZSBzeXN0ZW0gY2FsbHMsIGlmIGEgc2lnbmFsIGlzIGNhdWdodCB3aGlsZSB0aGUgY2FsbCBp
 cwogZXhlY3V0aW5nIGFuZCB0aGUgY2FsbCBpcyBwcmVtYXR1cmVseSB0ZXJtaW5hdGVkLAogdGhl
 IGNhbGwgaXMgYXV0b21hdGljYWxseSByZXN0YXJ0ZWQuCg==
 
 --+permail-2010020912505280e26a0b000022ac-a_best01+--
State-Changed-From-To: open->closed 
State-Changed-By: arundel 
State-Changed-When: Tue Aug 10 00:24:37 UTC 2010 
State-Changed-Why:  
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 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140474 
>Unformatted:
