aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd-diminished.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 15:36:40 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 15:36:40 +0100
commit6690f4c78b6b48c067fde6d14421c85e2b526303 (patch)
tree6cfa67140af096d3e9fdca6a02fdbe2327eff37c /src/satd-diminished.c
parentsatd: exec to an image without init text (diff)
downloadsat-6690f4c78b6b48c067fde6d14421c85e2b526303.tar.gz
sat-6690f4c78b6b48c067fde6d14421c85e2b526303.tar.bz2
sat-6690f4c78b6b48c067fde6d14421c85e2b526303.tar.xz
...
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/satd-diminished.c')
-rw-r--r--src/satd-diminished.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/satd-diminished.c b/src/satd-diminished.c
index ed885c7..7120b45 100644
--- a/src/satd-diminished.c
+++ b/src/satd-diminished.c
@@ -20,6 +20,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#include <unistd.h>
+#include <sys/socket.h>
@@ -29,6 +30,27 @@
#define SOCK_FILENO 3
+/**
+ * Command: queue a job.
+ */
+#define SAT_QUEUE 0
+
+/**
+ * Command: remove jobs.
+ */
+#define SAT_REMOVE 1
+
+/**
+ * Command: print job queue.
+ */
+#define SAT_PRINT 2
+
+/**
+ * Command: run jobs.
+ */
+#define SAT_RUN 3
+
+
/**
* The sat daemon.
@@ -42,6 +64,12 @@
int
main(int argc, char *argv[])
{
+ int fd;
+
+ fd = accept(SOCK_FILENO. NULL, NULL);
+ shutdown(fd, SHUT_RDWR);
+ close(fd);
+
close(SOCK_FILENO);
unlink(argv[1]);
return 0;