<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dss/ipc.c, branch master</title>
<subtitle>DSS - dyadic snapshot scheduler</subtitle>
<id>https://git.tue.mpg.de/cgit/dss/atom?h=master</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/dss/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/'/>
<updated>2025-03-23T18:13:50Z</updated>
<entry>
<title>Switch back to variadic log macros.</title>
<updated>2025-03-23T18:13:50Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2024-10-23T16:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=07b73ad8272084b706d18ee2286bf25711dbaabb'/>
<id>urn:sha1:07b73ad8272084b706d18ee2286bf25711dbaabb</id>
<content type='text'>
This essentially reverts commit 66cdd5bc99a5 which aimed to make the
dss log facility C89 conform. While this was a worthwhile goal in
2012, it has little value today, since in 2025 we can safely assume
a C99 compliant compiler.

The patch was created with

	git revert -Xours 66cdd5bc

followed by manual tweaks to make it compile again.
</content>
</entry>
<entry>
<title>Compute ipc key only once.</title>
<updated>2024-05-23T14:52:28Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2024-05-11T21:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=71f6d9f0a6876e37a95afa93eadaa68d7f912b8c'/>
<id>urn:sha1:71f6d9f0a6876e37a95afa93eadaa68d7f912b8c</id>
<content type='text'>
It's easier if dss.c passes the hash of the the config file path to
the ipc functions than to pass a char pointer.
</content>
</entry>
<entry>
<title>Resolve config file path only once.</title>
<updated>2024-05-23T14:52:28Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2024-04-27T21:45:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=73c6357dd381ec9b30d0db7aa1a0bc97ad942ea3'/>
<id>urn:sha1:73c6357dd381ec9b30d0db7aa1a0bc97ad942ea3</id>
<content type='text'>
Currently we call get_config_file_name() before each call call to a
public function of ipc.c because those functions compute the IPC key
from the filename. This is unnecessary and caused several bugs. Clean
up this mess by computing the filename only once and store it in a
global variable.
</content>
</entry>
<entry>
<title>Use standard realpath(3).</title>
<updated>2024-05-23T14:52:03Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2024-04-27T21:13:02Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=0f2a148c598eba6effb6b89c9b29cd18392d5b9b'/>
<id>urn:sha1:0f2a148c598eba6effb6b89c9b29cd18392d5b9b</id>
<content type='text'>
These days we may rely on the POSIX 2008 semantics of this function,
so remove our open-coded version.
</content>
</entry>
<entry>
<title>ipc.c: Remove a dead store.</title>
<updated>2017-11-19T01:53:33Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-11-14T02:18:10Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=be3b0326d868aed97fc4224dcbf0266c303d2871'/>
<id>urn:sha1:be3b0326d868aed97fc4224dcbf0266c303d2871</id>
<content type='text'>
scan-build correctly points out that the value stored to 'name'
is never read.
</content>
</entry>
<entry>
<title>Replace license boilerplate with single line SPDX comments.</title>
<updated>2017-11-19T01:53:25Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-11-06T00:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=1f5ecfacc341f893d73caa0a613d553af33a6cc9'/>
<id>urn:sha1:1f5ecfacc341f893d73caa0a613d553af33a6cc9</id>
<content type='text'>
This gets rid of existing copyright templates in favor of just the
one-liner SPDX (Software Package Data Exchange) notice. All files are
licensed under the GPL-2.0, so the same tag is added to each file. No
copyright is changed by this commit.

Several files (mostly the very short ones) did not contain a license
text so far. By default all files without license information are
under the default license of this package, which is GPL version 2.
This commit adds the missing SPDX line so that now all files except
dss.css, index.html.in, INSTALL, NEWS and README have it.

We also remove author and copyright year, since the author is the same
everywhere, and the year hasn't been updated any more since at least
six years. Accurate information is available from the git log.

The COPYING file can also be removed because the license text at
https://spdx.org/licenses/GPL-2.0.html is immutable.
</content>
</entry>
<entry>
<title>Revert "ipc.c: Use ftok() instead of SuperFastHash."</title>
<updated>2017-10-06T09:43:30Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-09-06T12:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=89c71fccb89dabf45274312c6922a3feb0bdac25'/>
<id>urn:sha1:89c71fccb89dabf45274312c6922a3feb0bdac25</id>
<content type='text'>
This reverts commit c92370affe722f38a85a41d1b5524e4a102b8f4d.

This was not a good idea because ftok(3) hashes, among other
information, the inode number of the file, and this number changes
every time the configuration file is edited.

The revert conflicted slightly to the commit which renamed
get_key_or_die() to get_key() and changed the type of the return
value to key_t, but the conflict was easy to resolve.
</content>
</entry>
<entry>
<title>ipc: Improve error diagnostics for kill.</title>
<updated>2017-07-26T15:53:20Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-04-16T10:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=3910462d958e9d8163eafba74052fed01c88a5d3'/>
<id>urn:sha1:3910462d958e9d8163eafba74052fed01c88a5d3</id>
<content type='text'>
If dss is not running, the kill command prints "No such file or
directory" because the call to semget(2) fails with ENOENT. This
message is a bit misleading, so let's return -E_NOT_RUNNING in this
case instead.
</content>
</entry>
<entry>
<title>ipc: Combine mutex_lock() and lock_dss().</title>
<updated>2017-07-13T17:08:36Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-04-16T10:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=c9ca5b454afdc78770ead263d081a2b377cafbe8'/>
<id>urn:sha1:c9ca5b454afdc78770ead263d081a2b377cafbe8</id>
<content type='text'>
The former function is only called by the latter, and both are short,
so let's combine them.
</content>
</entry>
<entry>
<title>ipc: Prefer key_t over int for System V IPC keys.</title>
<updated>2017-07-13T17:02:30Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-02-17T14:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=f6ae5e4753277ea35509c36dc618097b1175d632'/>
<id>urn:sha1:f6ae5e4753277ea35509c36dc618097b1175d632</id>
<content type='text'>
get_key() calls ftok(3), which returns a key_t value. key_t is also
the type which semget(2), the only function which receives the key via
mutex_get(), expects. It's stupid to convert the key_t from ftok(3)
into an int, only to convert it back to key_t later.

This patch changes ipc.c to use key_t everywhere. However, in
mutex_get() we print a log message containing the value of the key,
so the format string must be adjusted accordingly. Unfortunately,
on Linux, key_t is the same as int while on FreeBSD and NetBSD it is
defined as long. To avoid a warning from the compiler we use "%lx"
in the format string and cast the value to long.
</content>
</entry>
</feed>
