Skip to content

Instantly share code, notes, and snippets.

@wadie
wadie / warning.exs
Created August 3, 2018 11:59
Remove warning
iex(2)> original_stderr = Process.whereis(:standard_error)
#PID<0.59.0>
iex(3)> Process.unregister(:standard_error)
true
iex(4)> {:ok, dev} = StringIO.open("")
{:ok, #PID<0.184.0>}
iex(5)> Process.register(dev, :standard_error)
true
iex(6)> IO.puts :stderr, "Oops!"
:ok