[systemd-devel] [PATCH 1/3] core: Add LISTEN_NAMES environment variable

Lennart Poettering lennart at poettering.net
Mon May 18 09:17:52 PDT 2015

On Mon, 18.05.15 16:37, Krzysztof Opasiak (k.opasiak at samsung.com) wrote:

> >Why it the motivation? Patch description talks tabout passing the
> >path/address in LISTEN_NAMES. Isn't this something that can be queried
> >already? TODO talks about "identifiers". Is "identifier" the same thing,
> >or did the TODO item about have some different meaning?
> Not exactly. As far as I know it is not possible to get for example fifo
> path when you have only file descriptor.  
> So it is not possible to ask what
> is fifo path for this fd? but you may only ask if this path related with
> this fd? Currently it is done by doing stat on fd and stat on path and
> compare the results.
> If we pass this data in env we don't need to do stat on path but only do
> strcmp() (path cmp exactly, because /a/b/c is equal to /a////b///c).
> As far as I understood Lennart doing last hackfest paths are understood as
> identifiers but Lenart please correct me if I misunderstood something.

Well, I don't think it's a good idea to include paths in the ids,
since they are so problematic in a namespaced world. Instead, we
should just define our own namespace for the ids, and just require
them to be short strings, independent from any fs path, fd type or so...


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list