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

global/signal_handler: dump cmdline instead of arg[0] #10345

Merged
merged 1 commit into from Jul 26, 2016

Conversation

tchaikov
Copy link
Contributor

sometimes the daemon gets killed by a bash script. and $0 is always bash, which is just less useful.

<< dendl;
return "<unknown>";
Copy link
Member

Choose a reason for hiding this comment

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

I think you may need an extra
close(fd);
before return, otherwise there is a leak.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, thanks for pointing this out!

@xiexingguo
Copy link
Member

Looks good except for the fd leak

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov
Copy link
Contributor Author

changelog

  • fix the fd leak when read() fails
  • add a comment, as command line length limit is much larger than max PATH_MAX.

@tchaikov tchaikov deleted the wip-dump-cmdline branch July 27, 2016 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants