diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-28 16:17:47 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-28 16:17:47 +0100 |
commit | 444793a6ac7b1359a88a47b39c4c2e90c1fe5236 (patch) | |
tree | 8099401278486dfac07c8b1b0c3619def863b1f0 /src/loader/cgi.nim | |
parent | 6716b3a0013949dc8a0d51e39ae4724755305762 (diff) | |
download | chawan-444793a6ac7b1359a88a47b39c4c2e90c1fe5236.tar.gz |
fflush() before forks
seems like a good idea, especially because CGI uses stdout as the IPC mechanism
Diffstat (limited to 'src/loader/cgi.nim')
-rw-r--r-- | src/loader/cgi.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/loader/cgi.nim b/src/loader/cgi.nim index 3e3ec4fc..10809767 100644 --- a/src/loader/cgi.nim +++ b/src/loader/cgi.nim @@ -188,6 +188,8 @@ proc loadCGI*(handle: LoaderHandle; request: Request; cgiDir: seq[string]; contentLen = request.body.get.len elif request.multipart.isSome: contentLen = request.multipart.get.calcLength() + stdout.flushFile() + stderr.flushFile() let pid = fork() if pid == -1: handle.sendResult(ERROR_FAIL_SETUP_CGI) |