From d198ab627709910afdc4d9500468fab698ad6d60 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 29 Dec 2015 00:02:52 +0100 Subject: reopen state file, we will use flock on it, so all processes need their own open file descriptor for it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/satd-add.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/satd-add.c') diff --git a/src/satd-add.c b/src/satd-add.c index e143c00..497e32d 100644 --- a/src/satd-add.c +++ b/src/satd-add.c @@ -41,6 +41,8 @@ main(int argc, char *argv[]) int msg_argc; char **msg = NULL; + t (reopen(STATE_FILENO, O_RDRW)); + /* Receive and validate message. */ t (readall(SOCK_FILENO, &message, &n)); shutdown(SOCK_FILENO, SHUT_RD); -- cgit v1.2.3-70-g09d2