From owner-freebsd-doc Mon Sep 25 11:50:10 2000 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 490C937B43C for ; Mon, 25 Sep 2000 11:50:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA19698; Mon, 25 Sep 2000 11:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from monkeys.com (236.dsl9226.rcsis.com [63.92.26.236]) by hub.freebsd.org (Postfix) with ESMTP id DDBAE37B424 for ; Mon, 25 Sep 2000 11:43:54 -0700 (PDT) Received: (from rfg@localhost) by monkeys.com (8.9.3/8.9.3) id LAA10409; Mon, 25 Sep 2000 11:43:53 -0700 (PDT) Message-Id: <200009251843.LAA10409@monkeys.com> Date: Mon, 25 Sep 2000 11:43:53 -0700 (PDT) From: "Ronald F. Guilmette" Reply-To: rfg@monkeys.com (Ronald F. Guilmette) To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/21542: sigaction(2) man page is misleading Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 21542 >Category: docs >Synopsis: sigaction(2) man page is misleading >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 25 11:50:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Ronald F. Guilmette >Release: FreeBSD 4.1-RELEASE i386 >Organization: Infinite Monkeys & Co. >Environment: >Description: 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. >How-To-Repeat: See above. >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. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message