Removed dangerous exits
This commit is contained in:
@@ -138,7 +138,6 @@ NULL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (sitefile == NULL) {
|
if (sitefile == NULL) {
|
||||||
fprintf(stderr, "No sitefile configured\n");
|
fprintf(stderr, "No sitefile configured\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
@@ -230,7 +229,7 @@ NULL
|
|||||||
lowestThread = i;
|
lowestThread = i;
|
||||||
if (write(notify[lowestThread][1], &stream, sizeof(&stream))
|
if (write(notify[lowestThread][1], &stream, sizeof(&stream))
|
||||||
< sizeof(&stream))
|
< sizeof(&stream))
|
||||||
exit(EXIT_FAILURE);
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
16
src/runner.c
16
src/runner.c
@@ -77,24 +77,28 @@ remove:
|
|||||||
allocConns *= 2;
|
allocConns *= 2;
|
||||||
newfds = realloc(fds,
|
newfds = realloc(fds,
|
||||||
sizeof(struct pollfd) * allocConns);
|
sizeof(struct pollfd) * allocConns);
|
||||||
if (newfds == NULL)
|
if (newfds == NULL) {
|
||||||
exit(EXIT_FAILURE);
|
allocConns /= 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
fds = newfds;
|
fds = newfds;
|
||||||
|
|
||||||
newconns = realloc(connections,
|
newconns = realloc(connections,
|
||||||
sizeof(Connection) * allocConns);
|
sizeof(Connection) * allocConns);
|
||||||
if (newconns == NULL)
|
if (newconns == NULL) {
|
||||||
exit(EXIT_FAILURE);
|
allocConns /= 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
connections = newconns;
|
connections = newconns;
|
||||||
}
|
}
|
||||||
if (read(notify, &newstream, sizeof(newstream))
|
if (read(notify, &newstream, sizeof(newstream))
|
||||||
< sizeof(newstream))
|
< sizeof(newstream))
|
||||||
exit(EXIT_FAILURE);
|
continue;
|
||||||
fds[connCount].fd = newstream->fd;
|
fds[connCount].fd = newstream->fd;
|
||||||
fds[connCount].events = POLLIN;
|
fds[connCount].events = POLLIN;
|
||||||
|
|
||||||
if (newConnection(newstream, connections + connCount))
|
if (newConnection(newstream, connections + connCount))
|
||||||
exit(EXIT_FAILURE);
|
continue;
|
||||||
connCount++;
|
connCount++;
|
||||||
pending[id]++;
|
pending[id]++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user