Bug 21542

Summary: sigaction(2) man page is misleading
Product: Documentation Reporter: Ronald F. Guilmette <rfg>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Ronald F. Guilmette 2000-09-25 19:50:01 UTC
	The sigaction(2) man page is misleading with regards to the current
	(new) definition of the `struct sigaction' type.  That type is now
	defined as:

	struct  sigaction {
	        union {
	                void    (*__sa_handler) __P((int));
	                void    (*__sa_sigaction) __P((int, struct __siginfo *,
	                                               void *));
	        } __sigaction_u;                /* signal handler */
	        int     sa_flags;               /* see signal options below */
	        sigset_t sa_mask;               /* signal mask to apply */
	};

	But the definition given in the sigaction(2) man page leads one to
	believe that the following might be valid C code:

	struct sigaction thing = { handler, 0, 0 };

	but if you do that, with -Wall, gcc complains about a missing set of
	curly braces.

Fix: 

Just say what the POSIX standard says, i.e. ``The `struct sigaction'
	type contains at least the following members...''  Just say that on
	the man page, rather than attempting to actually show (inaccurately)
	the definition of the sigaction structure.
How-To-Repeat: 
	See above.
Comment 1 Jeroen Ruigrok van der Werven freebsd_committer freebsd_triage 2000-10-30 14:32:25 UTC
State Changed
From-To: open->analyzed

I committed a shortterm fix which at least shows the up-to-date 
source instead of the old one. 
I need to delve in my POSIX docs before I can change the wording. 

But at least it cannot be understand at this point. 


Comment 2 Jeroen Ruigrok van der Werven freebsd_committer freebsd_triage 2000-10-30 14:32:25 UTC
Responsible Changed
From-To: freebsd-doc->asmodai

I need to get some docs and look this over.
Comment 3 Jeroen Ruigrok van der Werven freebsd_committer freebsd_triage 2001-11-16 10:27:03 UTC
Responsible Changed
From-To: asmodai->freebsd-doc

Move back to the doc pool.
Comment 4 darklogik 2001-12-28 02:58:53 UTC
Using FreeBSD 5.0-Current, the manpage I have seems to have been 
updated since 4.1 and I was wondering if this change was done in 4.4 
Release?  If so, should this be closed?


Tom (darklogik) Rhodes
http://www.Pittgoth.com The Dark Portal Project
http://www.FreeBSD.org The Power To Serve
Comment 5 darklogik 2001-12-28 23:02:48 UTC
This pr is old, (look at the date) and I wanted to make sure that the 
current man page was not bothered.  4.4 4.5 and 5.0-CURRENT man pages 
have already been updated, I don't know how far back as I did not do 
version checking.  With this in effect I highly doubt this pr needs to 
remain open, any comments?

Tom Rhodes
www.Pittgoth.com
www.FreeBSD.org
Comment 6 nik freebsd_committer freebsd_triage 2002-01-09 13:12:21 UTC
State Changed
From-To: analyzed->closed

Man page updated in both -current and 4.4, so this can be closed.  Thanks 
for the report.