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

Incorrect eval invocation in priv/templates/Makefile #2553

Closed
sigsergv opened this issue May 17, 2021 · 1 comment
Closed

Incorrect eval invocation in priv/templates/Makefile #2553

sigsergv opened this issue May 17, 2021 · 1 comment

Comments

@sigsergv
Copy link

At this moment there are lines like this in Makefile template:

ERTS_INCLUDE_DIR ?= $(shell erl -noshell -s init stop -eval "io:format(\"~ts/erts-~ts/include/\", [code:root_dir(), erlang:system_info(version)]).")

It will fail on some systems during high load because -s init stop goes before -eval so environment variable won't be set properly. You should either move -s init stop to last argument of erl invocation or use halt() inside eval. Compare these commands:

erl -noshell -s init stop -eval 'timer:sleep(5000).'
erl -noshell -eval 'timer:sleep(5000).' -s init stop

First one stops in a second and second one runs 5+ seconds as intended.

ferd added a commit to ferd/rebar3 that referenced this issue May 17, 2021
@ferd
Copy link
Collaborator

ferd commented May 17, 2021

Fixed, thanks for the report.

@ferd ferd closed this as completed May 17, 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

No branches or pull requests

2 participants