From: Andre Noll Date: Fri, 17 Feb 2017 14:29:52 +0000 (+0100) Subject: ipc.c: Use ftok() instead of SuperFastHash. X-Git-Tag: v1.0.0~30 X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=commitdiff_plain;h=c92370affe722f38a85a41d1b5524e4a102b8f4d;hp=c92370affe722f38a85a41d1b5524e4a102b8f4d ipc.c: Use ftok() instead of SuperFastHash. 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(). ---