meillo@0: /* meillo@0: * Copyright (c) 2004 Gunnar Ritter meillo@0: * meillo@0: * This software is provided 'as-is', without any express or implied meillo@0: * warranty. In no event will the authors be held liable for any damages meillo@0: * arising from the use of this software. meillo@0: * meillo@0: * Permission is granted to anyone to use this software for any purpose, meillo@0: * including commercial applications, and to alter it and redistribute meillo@0: * it freely, subject to the following restrictions: meillo@0: * meillo@0: * 1. The origin of this software must not be misrepresented; you must not meillo@0: * claim that you wrote the original software. If you use this software meillo@0: * in a product, an acknowledgment in the product documentation would be meillo@0: * appreciated but is not required. meillo@0: * meillo@0: * 2. Altered source versions must be plainly marked as such, and must not be meillo@0: * misrepresented as being the original software. meillo@0: * meillo@0: * 3. This notice may not be removed or altered from any source distribution. meillo@0: */ meillo@0: /* Sccsid @(#)sigrelse.c 1.8 (gritter) 1/22/06 */ meillo@0: meillo@0: #if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \ meillo@0: defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) meillo@0: #include meillo@0: #include "sigset.h" meillo@0: meillo@0: int meillo@0: sigrelse(int sig) meillo@0: { meillo@0: sigset_t set, oset; meillo@0: meillo@0: if (sig <= 0) meillo@0: return -1; meillo@0: sigemptyset(&set); meillo@0: sigaddset(&set, sig); meillo@0: return sigprocmask(SIG_UNBLOCK, &set, &oset); meillo@0: } meillo@0: #endif /* __FreeBSD__ || __dietlibc__ || __NetBSD__ || __OpenBSD__ || meillo@0: __DragonFly__ || __APPLE__ */