how do I get this to work
spawn(fun() -> io:get_line("Prompt>") end).
to where it would work as if it didn’t have the spawn. I tried standard_io and group_leader() but doesn’t make difference.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try
What you see is a race condition between shell and your spawn/1. Generally when doing anything with io:get_line I would advice using ‘erl -noshell -s Mod Fun’ to start the program as that makes this issue go away.