--- a/src/server/safs/cgi.h Sat Jun 10 18:12:04 2023 +0200 +++ b/src/server/safs/cgi.h Sun Jun 11 15:53:55 2023 +0200 @@ -104,15 +104,32 @@ size_t writebuf_pos; /* + * number of bytes of the response body sent to the client + * at the end count_write should have the same value as parser->response_length + */ + size_t count_write; + + /* * poll_out event active */ WSBool poll_out; /* + * last read returned EWOULDBLOCK + * waiting for the next read event + */ + WSBool wait_read; + + /* * last write returned EWOULDBLOCK * waiting for the next write event */ - WSBool wait_write; + //WSBool wait_write; + + /* + * cgi pipe (stdout) EOF + */ + WSBool cgi_eof; /* * number of currently open events (stdout, stderr, [stdout])