]> git.tuebingen.mpg.de Git - dss.git/commit
run: Improve error message if dss is already running.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 17 Jun 2016 07:29:12 +0000 (09:29 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 13 Jul 2017 20:54:03 +0000 (22:54 +0200)
commit25b4f1983a3804353f5fc879f93ecde978a90aaf
tree308313c7bf649efc64ba3a6a8bf559247121399f
parent6c63f45a9068107cfd80aa181134574dd9373c0b
run: Improve error message if dss is already running.

The current error message, "child terminated unexpectedly", is not
very comprehensive.

The most likely reason for the child to terminate is that it could not
obtain the semaphore lock because another dss process is running. This
commit adds a test to com_run() that check this condition in the
parent before the child process is born. This way, if another process
is holding the lock, we can fail with a nice error message that also
includes the pid of the process that holds the lock.
dss.c
err.h