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

simple process spawn() seemingly failing #25

Open
stochastic-thread opened this issue Nov 25, 2016 · 7 comments
Open

simple process spawn() seemingly failing #25

stochastic-thread opened this issue Nov 25, 2016 · 7 comments
Labels

Comments

@stochastic-thread
Copy link

stochastic-thread commented Nov 25, 2016

a = spawn(fn -> receive do :arthur -> IO.puts(:hey) end end)
send a, :arthur

Erlang version: 19
Elixir version: 1.3.2
Notebook version 4.2.3

When I try to execute the above two lines, the notebook server prints the following out in the logs

2016-11-25 18:28:49.694 [error] Process #PID<0.201.0> raised an exception
** (ErlangError) erlang error: :terminated
    (stdlib) :io.put_chars(#PID<0.200.0>, :unicode, ["hey", 10])

When I try locally in an iex session, it works fine. Any idea what's the issue here? Does it not know that the notebook is stdout or something (just a guess...) ? I am pretty sure I've been able to do this previously, last time I messed around with IElixir

@pprzetacznik
Copy link
Owner

Hi @arthurcolle, can you test it one more time? I've fixed support for younger elixir/otp versions.

@pprzetacznik
Copy link
Owner

pprzetacznik commented Jul 3, 2018

@arthurcolle I'm abandon supporting of 1.3.2 version of elixir. Could you try this with the newer version and report the problems as another ticket if needed?

@stochastic-thread
Copy link
Author

thanks I'll check this out
depressing this was two years ago feels like last week

@pprzetacznik
Copy link
Owner

@arthurcolle same here. I see this problem still occurs. I'll take a look at this closer.

@pprzetacznik pprzetacznik reopened this Jul 4, 2018
@pprzetacznik
Copy link
Owner

@arthurcolle funny, it works fine when executed as two separated statements but not as one statement.

@stochastic-thread
Copy link
Author

@pprzetacznik interesting...i vaguely recall observing that behavior
any insight into elixir limitations that would/could cause this?

@rodolphofreire
Copy link

rodolphofreire commented Jul 27, 2018

I am facing the same problem and I made it kind of work with :stderr

a = spawn(fn -> receive do :arthur -> IO.puts(:stderr, :hey) end end)
send a, :arthur

Maybe is something related with the :standard_io outside the notebook process??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants