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

fix: fixes segfault when process is TERMed #335

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

dekobon
Copy link
Contributor

@dekobon dekobon commented Jun 6, 2023

Fixes #334

This change prevents agent from having a segmentation fault when it receives a TERM or INT signal.

Proposed changes

In this change, we add an explicit nil check for cmder in main.go around line 133. This prevents the condition where agent segfaults.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

Fixes nginx#334

This change prevents agent from having a segmentation fault when
it receives a TERM or INT signal.
@netlify
Copy link

netlify bot commented Jun 6, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit 0dcd66d
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/647f78466dbcaa00093f0f34

@github-actions github-actions bot added bug Something isn't working chore Pull requests for routine tasks labels Jun 6, 2023
@Dean-Coakley Dean-Coakley merged commit a0d027a into nginx:main Jun 8, 2023
@dekobon dekobon deleted the issue/334 branch June 8, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Pull requests for routine tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Agent segfaults intermittently when it receives a SIGTERM or SIGINT
3 participants