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

Make Linux Host adapter delete function more portable #333

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

mjbludwig
Copy link
Contributor

While making apps that run on an old Fedora 27 box, ran into an issue where the sinit process is actually named shim-init. This was failing the original grep in the kill function and apps could not be killed.

Switched the grep to an egrep, added the shim-init as an or option and used [] to escape the ( as older egreps can have problems with the standard ( escape.

Commit comment:
extended Linux Host adapter kill function grep to also find processes under the name shim-init and not just sinit

… under the name shim-init and not just sinit
Comment on lines 75 to +76
# Find the Singularity sinit PID child of the pane process
pane_sinit_pid=$(pstree -p -l "$pane_pid" | grep -o 'sinit([[:digit:]]*' | grep -o '[[:digit:]]*')
pane_sinit_pid=$(pstree -p -l "$pane_pid" | egrep -o 'sinit[(][[:digit:]]*|shim-init[(][[:digit:]]*' | grep -o '[[:digit:]]*')
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like greping trough pstree output isn't super stable. Or at least, there has to be a better way. Not clear why we didn't use tmux to list and stop the sessions.

Copy link
Contributor

@johrstrom johrstrom left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@johrstrom johrstrom merged commit 69bb343 into OSC:master Oct 22, 2021
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