/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* signal that disables syscall restart on interrupt with clear signal mask
* fun==SIG_DFL also unblocks signal
*/
#if !_UWIN
#endif
#include <ast.h>
#include <sig.h>
#if !_UWIN
#include <ast_map.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
#endif
#endif
#if defined(SV_ABORT)
#endif
#if !_std_signal && (_lib_sigaction && defined(SA_NOCLDSTOP) || _lib_sigvec && defined(SV_INTERRUPT))
#define sigemptyset(p) (*(p)=0)
#endif
extern Sig_handler_t
{
int unblock;
#ifdef SIGNO_MASK
unsigned int flags;
#endif
if (sig < 0)
{
unblock = 0;
}
else
#ifdef SIGNO_MASK
sig &= SIGNO_MASK;
#endif
#if defined(SA_INTERRUPT) || defined(SA_RESTART)
switch (sig)
{
#if defined(SIGIO)
case SIGIO:
#endif
#if defined(SIGTSTP)
case SIGTSTP:
#endif
#if defined(SIGTTIN)
case SIGTTIN:
#endif
#if defined(SIGTTOU)
case SIGTTOU:
#endif
#if defined(SA_RESTART)
#endif
break;
#endif
default:
#if defined(SA_INTERRUPT)
#endif
break;
}
#endif
return 0;
if (unblock)
return oa.sa_handler;
}
#else
#endif