Jump to content

Fork: Difference between revisions

299 bytes added ,  8 years ago
Added Elixir
(Added Elixir)
Line 143:
((plusp pid) (write-line "This is the original process."))
(t (error "Something went wrong while forking."))))</lang>
 
=={{header|DCL}}==
In OpenVMS DCL, spawning a subprocess creates a partially independent process. The parent and child processes share certain pooled quotas, certain shared resources, and if the parent process is deleted then the child process is too automatically.
Line 186 ⟶ 187:
4-JUN-2015 13:35:55
4-JUN-2015 13:35:57</pre>
 
=={{header|Elixir}}==
<lang elixir>defmodule Fork do
def start do
spawn(fn -> child end)
IO.puts "This is the original process"
end
def child, do: IO.puts "This is the new process"
end
 
Fork.start</lang>
 
{{out}}
<pre>
This is the original process
This is the new process
</pre>
 
=={{header|Erlang}}==
Line 209 ⟶ 228:
 
[ "Hello form child" print flush 0 _exit ] [ drop "Hi from parent" print flush ] with-fork</lang>
 
=={{header|Fexl}}==
There are many levels at which I can address this task. I'll start from the lowest possible level:
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.