diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 00:02:52 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 00:03:49 +0100 |
commit | d198ab627709910afdc4d9500468fab698ad6d60 (patch) | |
tree | fbb95119ec2ab2b48f35f55dace1e65cea728464 /src/satd-add.c | |
parent | the spool does not persist between boots (diff) | |
download | sat-d198ab627709910afdc4d9500468fab698ad6d60.tar.gz sat-d198ab627709910afdc4d9500468fab698ad6d60.tar.bz2 sat-d198ab627709910afdc4d9500468fab698ad6d60.tar.xz |
reopen state file, we will use flock on it, so all processes need their own open file descriptor for it
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/satd-add.c')
-rw-r--r-- | src/satd-add.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |