annotate lib/spawnattr_getdefault.c @ 10778:ddc567d280d1

Treat Haiku like BeOS.
author Ingo Weinhold <ingo_weinhold@gmx.de>
date Mon, 10 Nov 2008 12:30:58 +0100
parents d68de14ed3e7
children e8d2c6fc33ad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10520
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Copyright (C) 2000 Free Software Foundation, Inc.
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 This file is part of the GNU C Library.
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software: you can redistribute it and/or modify
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 (at your option) any later version.
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 #include <config.h>
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 /* Specification. */
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 #include <spawn.h>
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 #include <string.h>
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 /* Store signal mask for signals with default handling from ATTR in
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 SIGDEFAULT. */
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 int
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 posix_spawnattr_getsigdefault (const posix_spawnattr_t *attr,
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 sigset_t *sigdefault)
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 {
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 /* Copy the sigset_t data to the user buffer. */
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 memcpy (sigdefault, &attr->_sd, sizeof (sigset_t));
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 return 0;
d68de14ed3e7 New module 'posix_spawnattr_getsigdefault'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 }