Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2020 22:37:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 243103] fork fails to clone open message queue handles into the child process (in violation of POSIX std.)
Message-ID:  <bug-243103-99-YYJM3BWLAj@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-243103-99@https.bugs.freebsd.org/bugzilla/>
References:  <bug-243103-99@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D243103

--- Comment #10 from commit-hook@freebsd.org ---
A commit references this bug:

Author: imp
Date: Mon Jan 27 22:36:54 UTC 2020
New revision: 357183
URL: https://svnweb.freebsd.org/changeset/base/357183

Log:
  Make mqueue objects work across a fork again.

  In r110908 (2003) alfred added DFLAG_PASSABLE to tag those types of FD
  that can be passed via unix pipes, but mqueuefs didn't exist
  yet. Later, in r152825 (2005) davidxu neglected to include
  DFLAG_PASSABLE since people don't normally pass these things via unix
  sockets (it's a FreeBSD implementation detail that it's a file
  descriptor, nobody noticed). Then r223866 (2011) by jonathan used the
  new flag in fdcopy, which fork uses. Due to that, mqueuefs actually
  broke mqueue objects being propagated by fork. No mention of mqueuefs
  was made in r223866, so I think it was an unintended consequence.

  Fix this by tagging mqueuefs as passable as well. They were prior to
  alfred's change (and it's clear there's no intent in his change to
  change this behavior), and POSIX requires this to be the case as well.

  PR: 243103
  Reviewed by: kib@, jiles@
  Differential Revision: https://reviews.freebsd.org/D23038

Changes:
  head/sys/kern/uipc_mqueue.c

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-243103-99-YYJM3BWLAj>