1/* 2 * Copyright (c) 2007, 2008, 2009, 2011, 2013, ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#include <sys/cdefs.h> 11#include <errno.h> 12#include <signal.h> 13#include <barrelfish/barrelfish.h> 14#include <stdio.h> 15#include "posixcompat.h" 16 17__sighandler_t *signal(int signum, __sighandler_t *handler) 18{ 19 POSIXCOMPAT_DEBUG("Warning: signal(%d, %p) ignored\n", signum, handler); 20 return SIG_DFL; 21} 22 23__weak_reference(sigprocmask, __libc_sigprocmask); 24int sigprocmask(int how, const sigset_t *restrict set, sigset_t *restrict oset) 25{ 26 POSIXCOMPAT_DEBUG("Warning: sigprocmask(%d, %p, %p) ignored\n", 27 how, set, oset); 28 29 if(oset != NULL) { 30 // XXX: Return dummy empty set if requested 31 sigemptyset(oset); 32 } 33 34 return 0; 35} 36 37/*- 38 * Copyright (c) 1989, 1993 39 * The Regents of the University of California. All rights reserved. 40 * 41 * Redistribution and use in source and binary forms, with or without 42 * modification, are permitted provided that the following conditions 43 * are met: 44 * 1. Redistributions of source code must retain the above copyright 45 * notice, this list of conditions and the following disclaimer. 46 * 2. Redistributions in binary form must reproduce the above copyright 47 * notice, this list of conditions and the following disclaimer in the 48 * documentation and/or other materials provided with the distribution. 49 * 4. Neither the name of the University nor the names of its contributors 50 * may be used to endorse or promote products derived from this software 51 * without specific prior written permission. 52 * 53 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 54 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 55 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 56 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 57 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 58 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 59 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 60 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 61 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 62 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 63 * SUCH DAMAGE. 64 * 65 * @(#)sigsetops.c 8.1 (Berkeley) 6/4/93 66 */ 67 68int sigaction(int signum, const struct sigaction *act, 69 struct sigaction *oldact) 70{ 71 POSIXCOMPAT_DEBUG("Warning: sigaction(%d, %p, %p) ignored\n", 72 signum, act, oldact); 73 return 0; 74} 75 76int raise(int sig) 77{ 78 assert(!"NYI"); 79 return -1; 80} 81