Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mod_cgi] consolidate CGI cleanup code #31

Closed

Conversation

gstrauss
Copy link
Member

(more consistent behavior)

reference:
"Race leads to incorrect output in some circumstances"
https://redmine.lighttpd.net/issues/2542

reference:
  "Race leads to incorrect output in some circumstances"
  https://redmine.lighttpd.net/issues/2542

  (Thx, anomie, who identified and explained problem in above ticket)
(more consistent behavior)

reference:
  "Race leads to incorrect output in some circumstances"
  https://redmine.lighttpd.net/issues/2542
wait for CGI to close stdout, so we read EOF on pipe to end CGI response

remove extra call to waitpid() which will occur after process exits
if it has not already been explicitly closed by CGI (and has not been
inherited by CGI forked children)  (If CGI forks, then it should close
its stdout response pipe when response is done, especially if it intends
to perform lengthy post-processing in the background.)
(clean up potential zombie processes from unreaped children)
@stbuehler
Copy link
Member

Thanks! Applied in dde7bea.

@stbuehler stbuehler closed this Mar 4, 2016
@gstrauss
Copy link
Member Author

gstrauss commented Mar 4, 2016

@stbuehler, there is a whole lot more in this patch than just the last commit of the 4 commits in this branch. Would you take another look? Would you rather me squash them all together?

@stbuehler
Copy link
Member

Sorry, I only listed the final commit (the first of these four was #30 anyway); the other two were applied in e5e66f7 and f2cbd0a) - with some minor changes by me.

@gstrauss
Copy link
Member Author

gstrauss commented Mar 4, 2016

oh, I see. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants