Minor bug fixes

This commit is contained in:
Nate Choe
2022-02-16 23:13:21 -06:00
parent 978a6cbfd7
commit c67dd38bf1
4 changed files with 19 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ static void daemonize(char *pidfile) {
break;
default:
pidout = fopen(pidfile, "w");
fprintf(pidout, "%d\n", getpid());
fprintf(pidout, "%d\n", pid);
fclose(pidout);
exit(EXIT_SUCCESS);
}
@@ -218,6 +218,7 @@ NULL
for (;;) {
Stream *stream = acceptStream(listener, O_NONBLOCK);
int lowestThread;
createLog("Accepted stream");
if (stream == NULL) {
createLog("Accepting a stream failed");
continue;