aboutsummaryrefslogtreecommitdiff
path: root/hurd/fchroot.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-02-23 22:09:31 +0000
committerMiles Bader <miles@gnu.org>1997-02-23 22:09:31 +0000
commit6bac11d99322f3cdf751b43dc3b3456039fab26c (patch)
treebdec620c134a6b498fc21ea5d3825762a79ed558 /hurd/fchroot.c
parent4dea6fa212ba120779f4a1f9237e02b20ab74aa5 (diff)
downloadglibc-6bac11d99322f3cdf751b43dc3b3456039fab26c.tar
glibc-6bac11d99322f3cdf751b43dc3b3456039fab26c.tar.gz
glibc-6bac11d99322f3cdf751b43dc3b3456039fab26c.tar.bz2
glibc-6bac11d99322f3cdf751b43dc3b3456039fab26c.zip
(__libc_argv, __libc_argc): Make extern. (__hurd_threadvar_max, __hurd_threadvar_stack_offset, __hurd_threadvar_stack_mask): New variables.cvs/libc-970224
Diffstat (limited to 'hurd/fchroot.c')
-rw-r--r--hurd/fchroot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hurd/fchroot.c b/hurd/fchroot.c
index d745fb0866..143ea23807 100644
--- a/hurd/fchroot.c
+++ b/hurd/fchroot.c
@@ -35,7 +35,13 @@ fchroot (int fd)
}));
if (! err)
- _hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], dir);
+ {
+ file_t root;
+ err = __file_reparent (dir, MACH_PORT_NULL, &root);
+ __mach_port_deallocate (__mach_task_self (), dir);
+ if (! err)
+ _hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], root);
+ }
return err ? __hurd_fail (err) : 0;
}