Commit 6ea4e454 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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.
parent ae931b63
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment