Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 1999 22:44:03 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Marcel Moolenaar <marcel@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/gen getcwd.c 
Message-ID:  <19990928144403.3155A1CC1@overcee.netplex.com.au>
In-Reply-To: Your message of "Tue, 28 Sep 1999 06:24:14 MST." <199909281324.GAA08484@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Marcel Moolenaar wrote:
> marcel      1999/09/28 06:24:14 PDT
> 
>   Modified files:
>     lib/libc/gen         getcwd.c 
>   Log:
>   Explicitly use sigemptyset to clear a sigset_t. Explicit
>   initialization of sa_flags allows us to lose the bzero.

Hmm.. my experience on other systems suggests sigactions should be
pre-bzeroed (or memset) for portability reasons.  This is required on some
OS's as there are hidden fields in there, and doesn't require modifying the
whole tree when a new field is added or changed to struct sigaction.

eg, on another system:
struct  sigaction  {
        int sa_flags;
        void (*sa_handler)();
        sigset_t sa_mask;
        int sa_resv[2];
};

The programmer can't be expected to know what local additions to sigaction
an OS may have.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990928144403.3155A1CC1>