summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-03-22 15:43:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-03-22 15:43:09 +0000
commita8644ddba13434f0bfe22e151f16f73c23522f15 (patch)
tree531307d1ee3651e46c6ed3db4a9f63ec173adda0 /lib
parenta6f40b7e2b75fc35859c1660f325e2b383af2884 (diff)
clean the sigact in a portable way; ok matthew
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/posix_spawn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c
index cf1fadb1ef0..45fbb1973de 100644
--- a/lib/libc/gen/posix_spawn.c
+++ b/lib/libc/gen/posix_spawn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: posix_spawn.c,v 1.1 2012/03/21 23:20:35 matthew Exp $ */
+/* $OpenBSD: posix_spawn.c,v 1.2 2012/03/22 15:43:08 deraadt Exp $ */
/*-
* Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
* All rights reserved.
@@ -82,9 +82,12 @@ typedef struct __posix_spawn_file_actions_entry {
static int
process_spawnattr(const posix_spawnattr_t sa)
{
- struct sigaction sigact = { .sa_flags = 0, .sa_handler = SIG_DFL };
+ struct sigaction sigact;
int i;
+ memset(&sigact, 0, sizeof(sigact));
+ sigact.sa_handler = SIG_DFL;
+
/*
* POSIX doesn't really describe in which order everything
* should be set. We'll just set them in the order in which they