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

changed sleep to wait on PID for server cleanup #2

Closed
wants to merge 1 commit into from
Closed

changed sleep to wait on PID for server cleanup #2

wants to merge 1 commit into from

Conversation

frankwillmore
Copy link

minor mod to stopall.sh which waits on pid instead of sleeping

@jreadey
Copy link
Member

jreadey commented Jun 15, 2017

Does this really work? I wasn't too happy with the original approach when I wrote it, but runall.sh is calling run.sh. Since run.sh stop is calling docker stop <name> & , can't the run.sh background job still finish before the docker containers are shut down?

@frankwillmore
Copy link
Author

You're right... I didn't realize run.sh was launching background jobs. I added a line to wait on any outstanding jobs:
for job in jobs | awk '{print $1}' | sed -e "s/\[//" |sed -e "s/\]//" | sed -e "s/[+-]//"; do wait %$job 2>/dev/null; done

It ain't pretty but it works. I mostly was just making sure I knew how to do pull request on github. :-)

@jreadey jreadey closed this Apr 24, 2018
jreadey pushed a commit that referenced this pull request Mar 27, 2020
Update master with changes from HDFGroup/hsds
jreadey added a commit that referenced this pull request Feb 16, 2022
jreadey added a commit that referenced this pull request Oct 7, 2024
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