1/* 2 * Copyright 2007, Vasilis Kaoutsis, kaoutsis@sch.gr 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include <signal.h> 8 9#include <symbol_versioning.h> 10 11#include <signal_private.h> 12 13 14int 15__sigignore_beos(int signal) 16{ 17 // create an action to ignore the signal 18 struct sigaction_beos ignoreSignalAction; 19 ignoreSignalAction.sa_handler = SIG_IGN; 20 ignoreSignalAction.sa_flags = 0; 21 22 // In case of SIGCHLD the specification requires SA_NOCLDWAIT behavior. 23 if (signal == SIGCHLD) 24 ignoreSignalAction.sa_flags |= SA_NOCLDWAIT; 25 26 return __sigaction_beos(signal, &ignoreSignalAction, NULL); 27} 28 29 30int 31__sigignore(int signal) 32{ 33 // create an action to ignore the signal 34 struct sigaction ignoreSignalAction; 35 ignoreSignalAction.sa_handler = SIG_IGN; 36 ignoreSignalAction.sa_flags = 0; 37 38 // In case of SIGCHLD the specification requires SA_NOCLDWAIT behavior. 39 if (signal == SIGCHLD) 40 ignoreSignalAction.sa_flags |= SA_NOCLDWAIT; 41 42 return sigaction(signal, &ignoreSignalAction, NULL); 43} 44 45 46DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigignore_beos", "sigignore@", "BASE"); 47 48DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION("__sigignore", "sigignore@@", "1_ALPHA4"); 49