Move socket file to /run on Linux
/var/run  is considered legacy on Linux, the replacement is
/run . systemd v239+ started complaining about services and other unit files using
/var/run. We should migrate to the new path, and ndn-cxx should look for the socket file in
/run first (on Linux only).
On most, if not all, modern Linux distros
/var/run is a symbolic link to
/run, so I don't expect any disruption.
Updated by Eric Newberry over 1 year ago
- Target version set to v0.8
Davide Pesavento wrote:
What do you mean by "handle"? Whatever value appears in the config file takes precedence over the (hardcoded) default.
Sorry, I mean the default. By default, the config file refers to
/var/run/nfd.sock. I see four possible solutions (please let me know what you think of each):
- (a) Have different default config files for each platform (seems difficult and error-prone, especially with keeping the two versions consistent).
- (b) Perform some processing at compile-time to put different defaults for each platform in the config file (seems like overkill).
- (c) Leave
/var/run/nfd.sockin the config file, since this still works on Linux due to the symbolic link, and have the hardcoded default in the code be platform-specific (easiest).
- (d) Leave
/var/run/nfd.sockin the config file, but comment it out so that the hardcoded platform-specific path in code is used by default (my preferred solution, seems easy and not hacky - can also add a comment indicating default values for each platform in the config file).
Updated by Davide Pesavento over 1 year ago
We already do (b) so it's not overkill, and in fact it would be trivial to add the socket path to that existing logic. (d) is fine as well. (a) is unmaintainable and strictly worse than (b). (c) is pointless.
In summary, I'd be ok with either (b) or (d).