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-rm.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-rm.c')
-rw-r--r-- | src/satd-rm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/satd-rm.c b/src/satd-rm.c index 58b9eed..4feb93a 100644 --- a/src/satd-rm.c +++ b/src/satd-rm.c @@ -42,6 +42,8 @@ main(int argc, char *argv[]) char **arg; int rc = 0; + t (reopen(STATE_FILENO, O_RDRW)); + /* Receive and validate message. */ t (readall(SOCK_FILENO, &message, &n) || !n || message[n - 1]); shutdown(SOCK_FILENO, SHUT_RD); |