summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs.h6
-rw-r--r--sys/nfs/nfs_socket.c9
2 files changed, 10 insertions, 5 deletions
diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h
index efdb607..296e34f 100644
--- a/sys/nfs/nfs.h
+++ b/sys/nfs/nfs.h
@@ -326,8 +326,10 @@ struct uio; struct buf; struct vattr; struct nameidata; /* XXX */
* such as SIGALRM will not expect file I/O system calls to be interrupted
* by them and break.
*/
-#define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \
- sigmask(SIGHUP)|sigmask(SIGQUIT))
+#define NFSINT_SIGMASK(set) \
+ (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \
+ SIGISMEMBER(set, SIGHUP) || SIGISMEMBER(set, SIGKILL) || \
+ SIGISMEMBER(set, SIGQUIT))
/*
* Socket errors ignored for connectionless sockets??
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index 0059c51..9434fb9 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -55,6 +55,7 @@
#include <sys/syslog.h>
#include <sys/tprintf.h>
#include <sys/sysctl.h>
+#include <sys/signalvar.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -1501,14 +1502,16 @@ nfs_sigintr(nmp, rep, p)
struct nfsreq *rep;
register struct proc *p;
{
+ sigset_t tmpset;
+ tmpset = p->p_siglist;
+ SIGSETNAND(tmpset, p->p_sigmask);
+ SIGSETNAND(tmpset, p->p_sigignore);
if (rep && (rep->r_flags & R_SOFTTERM))
return (EINTR);
if (!(nmp->nm_flag & NFSMNT_INT))
return (0);
- if (p && p->p_siglist &&
- (((p->p_siglist & ~p->p_sigmask) & ~p->p_sigignore) &
- NFSINT_SIGMASK))
+ if (p && SIGNOTEMPTY(p->p_siglist) && NFSINT_SIGMASK(tmpset))
return (EINTR);
return (0);
}
OpenPOWER on IntegriCloud