X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=dss.c;h=8547f24a55e6c218d76fe002f7c76baa6c81e958;hb=25b4f1983a3804353f5fc879f93ecde978a90aaf;hp=6f0d759db4a71084f04967f7f32aa65ea68dd394;hpb=6c63f45a9068107cfd80aa181134574dd9373c0b;p=dss.git diff --git a/dss.c b/dss.c index 6f0d759..8547f24 100644 --- a/dss.c +++ b/dss.c @@ -1511,11 +1511,20 @@ static void lock_dss_or_die(void) static int com_run(void) { int ret, fd = -1; + char *config_file; + pid_t pid; if (OPT_GIVEN(DSS, DRY_RUN)) { DSS_ERROR_LOG(("dry run not supported by this command\n")); return -E_SYNTAX; } + config_file = get_config_file_name(); + ret = get_dss_pid(config_file, &pid); + free(config_file); + if (ret >= 0) { + DSS_ERROR_LOG(("pid %d\n", (int)pid)); + return -E_ALREADY_RUNNING; + } if (OPT_GIVEN(RUN, DAEMON)) { fd = daemon_init(); daemonized = true;