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.
*pid = 0;
ret = mutex_get(key, 0);
if (ret < 0)
*pid = 0;
ret = mutex_get(key, 0);
if (ret < 0)
+ return ret == -ERRNO_TO_DSS_ERROR(ENOENT)? -E_NOT_RUNNING : ret;
semid = ret;
ret = semctl(semid, 1, GETPID);
if (ret < 0)
semid = ret;
ret = semctl(semid, 1, GETPID);
if (ret < 0)