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

Use fcntl and FD_CLOEXEC if O_CLOEXEC is undefined #142

Closed
wants to merge 5 commits into from

Conversation

acesso
Copy link
Contributor

@acesso acesso commented Jan 22, 2015

Same reported at #87 but at src/shrpx_config.cc src/instead of util.cc

Same reported at nghttp2#87 but at src/shrpx_config.cc src/instead of util.cc
@tatsuhiro-t
Copy link
Member

Thank you for PR! Could you check my comment?

@acesso
Copy link
Contributor Author

acesso commented Jan 22, 2015

fixed and tested, compiled like a charm


// We get race condition if execve is called at the same time.
if(fd != -1) {
int make_socket_closeonexec_(fd);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct to me.
I proposed specifically util::make_socket_closeonexec(fd);

@tatsuhiro-t
Copy link
Member

Merged via 7ea8037
Thank you!

acesso pushed a commit to acesso/nghttp2 that referenced this pull request Mar 2, 2015
declaration of make_socket_closeonexec need the proper scope here, it was there per request at nghttp2#142 , not sure why is was removed.
@acesso acesso mentioned this pull request Mar 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants