[systemd-devel] [PATCH] manager: Ensure user's systemd runtime directory exists.

Colin Guthrie gmane at colin.guthr.ie
Mon Nov 3 00:02:21 PST 2014


Zbigniew Jędrzejewski-Szmek wrote on 02/11/14 18:18:
> On Sun, Nov 02, 2014 at 02:04:20PM +0000, Colin Guthrie wrote:
>> This mirrors code in dbus.c when creating the private socket and
>> avoids error messages like:
>>
>> systemd[1353]: bind(/run/user/603/systemd/notify) failed: No such file or directory
>> systemd[1353]: Failed to fully start up daemon: No such file or directory
> 
> Seems reasonable. But why not move the mkdir_parent_label() to the shared
> code path? Even if the dir is created elsewhere, it seems cleaner to ensure
> here that it is available.

Well, to be honest, I just copied the structure from dbus.c.

I can easily do as you suggest in both places if you think it's nicer. I
guess this would add two unnecessary stat()s (at least - not looked at
the mkdir... implementation!) on boot however, so might just be better
leaving it as is (not that that is a real problem practically speaking,
especially in tmpfs!).

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list