aboutsummaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2007-07-22 22:43:02 +0000
committerRoland McGrath <roland@gnu.org>2007-07-22 22:43:02 +0000
commit626a51fd5ca2e497c1202de4406414cba2401cd5 (patch)
tree06947086536e39c9808479b1055d46a874abd1cd /hurd
parentc942388dad906c5384837a09477ac743fffed157 (diff)
downloadglibc-626a51fd5ca2e497c1202de4406414cba2401cd5.tar
glibc-626a51fd5ca2e497c1202de4406414cba2401cd5.tar.gz
glibc-626a51fd5ca2e497c1202de4406414cba2401cd5.tar.bz2
glibc-626a51fd5ca2e497c1202de4406414cba2401cd5.zip
2007-07-22 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/bits/fcntl.h [__USE_GNU] (O_CLOEXEC): New macro. * hurd/port2fd.c (_hurd_port2fd): Implement O_CLOEXEC.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/port2fd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hurd/port2fd.c b/hurd/port2fd.c
index 48b74f1add..262e6d9694 100644
--- a/hurd/port2fd.c
+++ b/hurd/port2fd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 1999, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -55,7 +55,7 @@ _hurd_port2fd (struct hurd_fd *d, io_t dport, int flags)
mach_port_t old
= _hurd_userlink_clear (&d->port.users) ? d->port.port : MACH_PORT_NULL;
d->port.port = dport;
- d->flags = 0;
+ d->flags = (flags & O_CLOEXEC) ? FD_CLOEXEC : 0;
if (old != MACH_PORT_NULL)
__mach_port_deallocate (__mach_task_self (), old);
}