lunix has no SIGSYS

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@603 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-07-01 17:03:51 +00:00
parent 867e9bc946
commit 6c1f09cb89

View File

@@ -10,6 +10,7 @@ RCSID("$Id$");
#ifdef HAVE_SYS_FILIO_H #ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h> #include <sys/filio.h>
#endif #endif
#include <sys/syscall.h>
#include <signal.h> #include <signal.h>
#include <setjmp.h> #include <setjmp.h>
@@ -328,7 +329,9 @@ k_pioctl(char *a_path,
#endif #endif
errno = ENOSYS; errno = ENOSYS;
#ifdef SIGSYS
kill(getpid(), SIGSYS); /* You loose! */ kill(getpid(), SIGSYS); /* You loose! */
#endif
return -1; return -1;
} }
@@ -364,12 +367,16 @@ k_setpag(void)
#endif #endif
errno = ENOSYS; errno = ENOSYS;
#ifdef SIGSYS
kill(getpid(), SIGSYS); /* You loose! */ kill(getpid(), SIGSYS); /* You loose! */
#endif
return -1; return -1;
} }
static jmp_buf catch_SIGSYS; static jmp_buf catch_SIGSYS;
#ifdef SIGSYS
static void static void
SIGSYS_handler(int sig) SIGSYS_handler(int sig)
{ {
@@ -378,6 +385,8 @@ SIGSYS_handler(int sig)
longjmp(catch_SIGSYS, 1); longjmp(catch_SIGSYS, 1);
} }
#endif
int int
k_hasafs(void) k_hasafs(void)
{ {
@@ -400,7 +409,9 @@ k_hasafs(void)
memset(&parms, 0, sizeof(parms)); memset(&parms, 0, sizeof(parms));
saved_errno = errno; saved_errno = errno;
#ifdef SIGSYS
saved_func = signal(SIGSYS, SIGSYS_handler); saved_func = signal(SIGSYS, SIGSYS_handler);
#endif
#ifdef AFS_SYSCALL #ifdef AFS_SYSCALL
if (setjmp(catch_SIGSYS) == 0) if (setjmp(catch_SIGSYS) == 0)
@@ -454,7 +465,9 @@ k_hasafs(void)
#endif #endif
done: done:
#ifdef SIGSYS
(void) signal(SIGSYS, saved_func); (void) signal(SIGSYS, saved_func);
#endif
errno = saved_errno; errno = saved_errno;
return afs_entry_point != NO_ENTRY_POINT; return afs_entry_point != NO_ENTRY_POINT;
} }