From a8644ddba13434f0bfe22e151f16f73c23522f15 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 22 Mar 2012 15:43:09 +0000 Subject: clean the sigact in a portable way; ok matthew --- lib/libc/gen/posix_spawn.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/libc') 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 * 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 -- cgit v1.2.3