aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd-diminished.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 16:05:14 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 16:06:27 +0100
commite19f12b1dbdb328b5ff5574b1cda2c282901769f (patch)
tree6bc0eec8cdd589a99ce857993dd818d215df3c22 /src/satd-diminished.c
parentadd deps (diff)
downloadsat-e19f12b1dbdb328b5ff5574b1cda2c282901769f.tar.gz
sat-e19f12b1dbdb328b5ff5574b1cda2c282901769f.tar.bz2
sat-e19f12b1dbdb328b5ff5574b1cda2c282901769f.tar.xz
create state file
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--src/satd-diminished.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/satd-diminished.c b/src/satd-diminished.c
index 7120b45..82ab1cf 100644
--- a/src/satd-diminished.c
+++ b/src/satd-diminished.c
@@ -29,6 +29,11 @@
*/
#define SOCK_FILENO 3
+/**
+ * The file descriptor for the state file.
+ */
+#define STATE_FILENO 4
+
/**
* Command: queue a job.
@@ -55,9 +60,10 @@
/**
* The sat daemon.
*
- * @param argc Should be 3.
+ * @param argc Should be 4
* @param argv The name of the process, the pathname of the socket,
- * and $SAT_HOOK_PATH (the pathname of the hook-script.)
+ * the pathname to the state file, and $SAT_HOOK_PATH
+ * (the pathname of the hook-script.)
* @return 0 The process was successful.
* @return 1 The process failed queuing the job.
*/
@@ -72,6 +78,7 @@ main(int argc, char *argv[])
close(SOCK_FILENO);
unlink(argv[1]);
+ unlink(argv[2]); /* Only on success! */
return 0;
(void) argc;
}