diff options
author | Bruno Haible <bruno@clisp.org> | 2008-09-28 14:05:12 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2008-09-28 14:05:12 +0200 |
commit | 2903a5c69182cb693db9afb9c64ad14c586a43cc (patch) | |
tree | 931cec4398492a134accbe227873c2d3fb65f6dd /lib/spawnattr_getdefault.c | |
parent | 2c984d42b8b4b1c5d48a61fd1f01f4e8d9f42172 (diff) | |
download | gnulib-2903a5c69182cb693db9afb9c64ad14c586a43cc.tar.gz |
New module 'posix_spawnattr_getsigdefault'.
Diffstat (limited to 'lib/spawnattr_getdefault.c')
-rw-r--r-- | lib/spawnattr_getdefault.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/spawnattr_getdefault.c b/lib/spawnattr_getdefault.c new file mode 100644 index 0000000000..53f7d530f9 --- /dev/null +++ b/lib/spawnattr_getdefault.c @@ -0,0 +1,34 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +/* Specification. */ +#include <spawn.h> + +#include <string.h> + +/* Store signal mask for signals with default handling from ATTR in + SIGDEFAULT. */ +int +posix_spawnattr_getsigdefault (const posix_spawnattr_t *attr, + sigset_t *sigdefault) +{ + /* Copy the sigset_t data to the user buffer. */ + memcpy (sigdefault, &attr->_sd, sizeof (sigset_t)); + + return 0; +} |