]> git.tuebingen.mpg.de Git - dss.git/commitdiff
ipc.c: Use ftok() instead of SuperFastHash.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 17 Feb 2017 14:29:52 +0000 (15:29 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 Jun 2017 19:35:36 +0000 (21:35 +0200)
ftok(3) uses the identity of the named file to generate a key_t type
System V IPC key, which is easier than computing the key by hashing
the (resolved) pathname of the config file. This change allows to
get rid of the realpath() and the super_fast_hash() implementation.

If ftok(3) fails, presumably because the underlying call to stat(2)
fails, we now simply return a phony identifier, similar to what we did
before in this case. This eliminates the only possible failure path
in get_key_or_die(), so this function is renamed to get_key().


No differences found