aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-14 17:03:05 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-14 17:03:05 -0700
commit6ea4e45463726b8a5adcba50315b3bec4ea78a1e (patch)
tree66b1905df2f4055676350df1aad442e522731917 /ipc
parentae931b63bab89b28010cf9b0f16d12cdb4dbd08d (diff)
downloadhistory-6ea4e45463726b8a5adcba50315b3bec4ea78a1e.tar.gz
[PATCH] mq_open() and close_on_exec
From: Chris Wright <chrisw@osdl.org> SUSv3 doesn't seem to specify one way or the other. I don't have the POSIX specs, and the old docs I have suggest that mq_open() creates an object which is to be closed upon exec. Jakub said: I think it is valid and required: http://www.opengroup.org/onlinepubs/007904975/functions/exec.html All open message queue descriptors in the calling process shall be closed, as described in mq_close() I'll add a new test for this into glibc testsuite.
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mqueue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 631de851edf061..72f74d564f9b42 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -646,6 +646,7 @@ asmlinkage long sys_mq_open(const char __user *u_name, int oflag, mode_t mode,
goto out_putfd;
}
+ set_close_on_exec(fd, 1);
fd_install(fd, filp);
goto out_upsem;