X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/815e510ac8f79ac0c3ba2032a98e919e43df1a02..a8a4d6d837f5029124d26483e4b3a390de69823e:/httpd.c diff --git a/httpd.c b/httpd.c index aa40084..dd7aa23 100644 --- a/httpd.c +++ b/httpd.c @@ -569,17 +569,20 @@ void run_httpd(const void *t, int authmask, const struct httpd_config *dcfg, printf("URL: http://%s:%d/\n", inet_ntoa(addr.sin_addr), ntohs(addr.sin_port)); } + fflush(stdout); /* * Now construct an fd structure to hold it. */ new_fdstruct(fd, FD_LISTENER); - /* - * Read from standard input, and treat EOF as a notification - * to exit. - */ - new_fdstruct(0, FD_CLIENT); + if (dcfg->closeoneof) { + /* + * Read from standard input, and treat EOF as a notification + * to exit. + */ + new_fdstruct(0, FD_CLIENT); + } /* * Now we're ready to run our main loop. Keep looping round on