1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Explicitly use sigemptyset to clear a sigset_t. Explicit

initialization of sa_flags allows us to lose the bzero.

$FreeBSD$ tag added.
This commit is contained in:
Marcel Moolenaar 1999-09-28 13:24:13 +00:00
parent 23f84772ca
commit 4c9d9fc620
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51758

View File

@ -29,6 +29,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*
* $FreeBSD$
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
@ -101,7 +103,8 @@ getcwd(pt, size)
int ret; int ret;
if (have__getcwd == 1) { /* unsure? */ if (have__getcwd == 1) { /* unsure? */
bzero(&sa, sizeof(sa)); sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sa.sa_handler = SIG_IGN; sa.sa_handler = SIG_IGN;
if (sigaction(SIGSYS, &sa, &osa) >= 0) if (sigaction(SIGSYS, &sa, &osa) >= 0)
sigsys_installed = 1; sigsys_installed = 1;