SUNRPC: Ensure that SIGKILL will always terminate a synchronous RPC call.
...and make sure that the "intr" flag also enables SIGHUP and SIGTERM to interrupt RPC calls too (as per the Solaris implementation). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -386,11 +386,11 @@ static const struct rpc_call_ops rpc_default_ops = {
|
||||
* Export the signal mask handling for synchronous code that
|
||||
* sleeps on RPC calls
|
||||
*/
|
||||
#define RPC_INTR_SIGNALS (sigmask(SIGINT) | sigmask(SIGQUIT) | sigmask(SIGKILL))
|
||||
#define RPC_INTR_SIGNALS (sigmask(SIGHUP) | sigmask(SIGINT) | sigmask(SIGQUIT) | sigmask(SIGTERM))
|
||||
|
||||
static void rpc_save_sigmask(sigset_t *oldset, int intr)
|
||||
{
|
||||
unsigned long sigallow = 0;
|
||||
unsigned long sigallow = sigmask(SIGKILL);
|
||||
sigset_t sigmask;
|
||||
|
||||
/* Block all signals except those listed in sigallow */
|
||||
|
||||
Reference in New Issue
Block a user