Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cf-watchd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ AM_CPPFLAGS = -I$(srcdir)/../libpromises -I$(srcdir)/../libntech/libutils \
$(PCRE2_CPPFLAGS) \
$(ENTERPRISE_CPPFLAGS)

AM_CFLAGS = @CFLAGS@ \
AM_CFLAGS = $(CF3_CFLAGS) \
$(DEBUG_CFLAGS) \
$(OPENSSL_CFLAGS) \
$(ENTERPRISE_CFLAGS)

Expand Down
2 changes: 2 additions & 0 deletions cf-watchd/cf-watchd.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ int main(int argc, char **argv)
EvalContext *ctx = EvalContextNew();
GenericAgentConfigApply(ctx, config);

#ifndef __MINGW32__
pid_t existing_pid = ReadPID("cf-watchd.pid");
if ((existing_pid != -1) && (kill(existing_pid, 0) == 0))
{
Log(LOG_LEVEL_ERR, "Another instance of cf-watchd is already running, terminating");
return 1;
}
#endif

#ifdef __MINGW32__

Expand Down
Loading