aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd-diminished.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 18:22:21 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 18:22:21 +0100
commit280f7068d28361af3468b87eef2353d870fa3598 (patch)
tree9e4a159825c2d1d8eaf3d19750ba1925bff6a6c0 /src/satd-diminished.c
parenttypo (diff)
downloadsat-280f7068d28361af3468b87eef2353d870fa3598.tar.gz
sat-280f7068d28361af3468b87eef2353d870fa3598.tar.bz2
sat-280f7068d28361af3468b87eef2353d870fa3598.tar.xz
what was I thinging
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/satd-diminished.c')
-rw-r--r--src/satd-diminished.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/satd-diminished.c b/src/satd-diminished.c
index e151c5b..d05823d 100644
--- a/src/satd-diminished.c
+++ b/src/satd-diminished.c
@@ -38,11 +38,6 @@
*/
#define STATE_FILENO 4
-/**
- * The file descriptor for connection to the current client.
- */
-#define CONN_FILENO 5
-
/**
* Command: queue a job.
@@ -125,14 +120,6 @@ main(int argc, char *argv[], char *envp[])
if (signal(SIGHUP, sighandler) == SIG_ERR) goto fail;
if (signal(SIGCHLD, sighandler) == SIG_ERR) goto fail;
- /* Pick-up where we left off. */
- if (!fstat(CONN_FILENO, &_attr)) {
- fd = CONN_FILENO;
- goto peek_again;
- } else if (errno != EBADF) {
- goto fail;
- }
-
/* The magnificent loop. */
accept_again:
if (received_signo == SIGHUP) {
@@ -152,13 +139,8 @@ accept_again:
goto fail;
}
}
- if (fd != CONN_FILENO) {
- if (dup2(fd, CONN_FILENO) == -1)
- goto fail;
- close(fd), fd = CONN_FILENO;
- }
peek_again:
- if (recv(fd, &type, sizeof(char), MSG_PEEK /* Just peek in case we fail! */) <= 0) {
+ if (read(fd, &type, sizeof(char)) <= 0) {
perror(argv[0]);
goto connection_done;
}