External processes with environment variables

What precise error did you get? erlexec worked fine for me so…

You could also try Porcelain, it is basically a more standard elixir erlexec with not quite as many features, for the control you need you will probably need to use it’s extended driver as well.

This will not kill it ever, and yeah it may not die because it has a child process pending.

Maybe something more like?

#!/bin/bash
cd ../app/easy_life_ui
PORT=4001 yarn start > /dev/null &
IPID=$!
cat # This waits until stdin closes
kill $IPID
sleep 1
kill -9 $IPID

Or so?