public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* mq_open() and close_on_exec?
@ 2004-04-14  0:40 Chris Wright
  2004-04-14  4:47 ` Manfred Spraul
  2004-04-14  6:12 ` Jakub Jelinek
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wright @ 2004-04-14  0:40 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: Andrew Morton, Ulrich Drepper, Linux Kernel

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.  Anyone have a clue if this is
actually required?  Patch below sets this as default (if indeed it's
valid/required).

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

===== ipc/mqueue.c 1.6 vs edited =====
--- 1.6/ipc/mqueue.c	Mon Apr 12 10:54:17 2004
+++ edited/ipc/mqueue.c	Tue Apr 13 16:05:36 2004
@@ -641,6 +641,7 @@
 		goto out_putfd;
 	}
 
+	set_close_on_exec(fd, 1);
 	fd_install(fd, filp);
 	goto out_upsem;
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-14 16:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-14  0:40 mq_open() and close_on_exec? Chris Wright
2004-04-14  4:47 ` Manfred Spraul
2004-04-14 16:49   ` Chris Wright
2004-04-14  6:12 ` Jakub Jelinek
2004-04-14 16:53   ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox