summaryrefslogtreecommitdiff
path: root/libports/inhibit-class-rpcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libports/inhibit-class-rpcs.c')
-rw-r--r--libports/inhibit-class-rpcs.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libports/inhibit-class-rpcs.c b/libports/inhibit-class-rpcs.c
index 00b9b361..951de4bf 100644
--- a/libports/inhibit-class-rpcs.c
+++ b/libports/inhibit-class-rpcs.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
Written by Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -39,8 +39,13 @@ ports_inhibit_class_rpcs (struct port_class *class)
for (pi = class->ports; pi; pi = pi->next)
for (rpc = pi->current_rpcs; rpc; rpc = rpc->next)
- if (hurd_thread_cancel (rpc->thread) == EINTR)
- this_one = 1;
+ {
+ /* Avoid cancelling the calling thread. */
+ if (rpc->thread == hurd_thread_self ())
+ this_one = 1;
+ else
+ hurd_thread_cancel (rpc->thread);
+ }
while (class->rpcs > this_one)
{