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

Exit out if 'exec' fails #163

Merged

Conversation

matyasselmeci
Copy link
Contributor

I ran into two issues while trying to use this image with apptainer run:

  • apptainer run put -- into the first argument, causing exec "$@" to fail because it wasn't a real option
  • the exec command failing did not cause the script to stop

@matyasselmeci matyasselmeci marked this pull request as draft February 1, 2024 19:10
@matyasselmeci matyasselmeci marked this pull request as ready for review February 1, 2024 19:15
@matyasselmeci
Copy link
Contributor Author

OK, ready for review. Turns out apptainer wasn't doing anything weird, it's just I was doing apptainer run image.sif --contain ... instead of apptainer run --contain image.sif ... and I was getting what I asked for. We should still handle exec failing.

@matyasselmeci matyasselmeci changed the title Exit out if 'exec' fails; also handle apptainer run putting a '--' as the first argument to the entrypoint Exit out if 'exec' fails Feb 1, 2024
Copy link
Member

@brianhlin brianhlin left a comment

Choose a reason for hiding this comment

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

LGTM

@brianhlin brianhlin merged commit ab07dd8 into opensciencegrid:master Feb 2, 2024
10 checks passed
@matyasselmeci matyasselmeci deleted the pr/die-if-exec-fails branch August 13, 2024 18:22
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