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

added a kill command in pxh console to kill the whole process including gz server #23881

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rajeev-gupta-bashrc
Copy link

The solution is related to this issue:
#23880

@rajeev-gupta-bashrc rajeev-gupta-bashrc marked this pull request as draft November 1, 2024 16:51
@rajeev-gupta-bashrc rajeev-gupta-bashrc marked this pull request as ready for review November 1, 2024 16:52
int ret = system("pkill -9 -f gz");
(void)ret; // Suppress warning about unused return value
printf("Killed gz...\n");
ret = system("pkill -9 -f px4");
Copy link
Member

Choose a reason for hiding this comment

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

This seems wrong, why should px4 kill itself with pkill? Is there a reason we can't shutdown cleanly in the first place?

fflush(stdout);

// Force kill all child processes
int ret = system("pkill -9 -f gz");
Copy link
Member

Choose a reason for hiding this comment

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

We don't necessarily want to kill gazebo everytime.

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.

2 participants