summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-07-20 21:04:41 +0000
committerRoland McGrath <roland@gnu.org>1999-07-20 21:04:41 +0000
commit57d588608cf1f8b9c4455a3f285c6eba1f95bb14 (patch)
treee481970cdc02239a1a53429cc93833494ff3cf53
parent2aefabe1a2efb2a3ef436884068d040c79952dce (diff)
downloadglibc-57d588608cf1f8b9c4455a3f285c6eba1f95bb14.tar.gz
glibc-57d588608cf1f8b9c4455a3f285c6eba1f95bb14.tar.xz
glibc-57d588608cf1f8b9c4455a3f285c6eba1f95bb14.zip
1999-07-17 Roland McGrath <roland@baalperazim.frob.com>
	* hurd/hurdexec.c (_hurd_exec): Prune trailing null ports from the
	descriptor table sent in the RPC.
-rw-r--r--hurd/hurdexec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c
index 18ad9ef38d..30a27e8048 100644
--- a/hurd/hurdexec.c
+++ b/hurd/hurdexec.c
@@ -186,6 +186,10 @@ _hurd_exec (task_t task, file_t file,
       dtable_cells = NULL;
     }
 
+  /* Prune trailing null ports from the descriptor table.  */
+  while (dtable[dtablesize - 1] == MACH_PORT_NULL)
+    --dtablesize;
+
   /* The information is all set up now.  Try to exec the file.  */
 
   {