Description of problem:
The /usr/bin/erl (which is a symlink to /usr/lib64/erlang/bin/erl which is a symlink to /usr/lib64/erlang/erts-22.214.171.124/bin/erl) invokes sed just to get the basename from $0 to set it to PROGNAME:
PROGNAME=`echo $0 | sed 's/.*\///'`
It should be possible to just use string substitution
with the same effect.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Strace some erl command to see what processes are started.
There's a fork + exec of sed.
No external process should be needed.
/usr/lib64/erlang/bin/start_erl could use the same change.
(In reply to Jan Pazdziora from comment #0)
Jan, thanks for the report. Just in case - do you know if it's a "bashism" or not?
It is POSIX-ism. I've also filed it upstream as https://github.com/erlang/otp/pull/1814 but it was determined to be breaking some shells of those that otp supports.
So we cannot get the change from upstream but we might be able to patch on the distribution level where we know what shell we ship in Fedora.
erlang-126.96.36.199-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2cc78b6d31
erlang-188.8.131.52-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2cc78b6d31
erlang-184.108.40.206-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.