A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
18
Task/Fork/Ada/fork.ada
Normal file
18
Task/Fork/Ada/fork.ada
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
with Ada.Text_IO,
|
||||
POSIX.Process_Identification,
|
||||
POSIX.Unsafe_Process_Primitives;
|
||||
|
||||
procedure Fork is
|
||||
use Ada.Text_IO,
|
||||
POSIX.Process_Identification,
|
||||
POSIX.Unsafe_Process_Primitives;
|
||||
begin
|
||||
if Fork = Null_Process_ID then
|
||||
Put_Line ("This is the new process.");
|
||||
else
|
||||
Put_Line ("This is the original process.");
|
||||
end if;
|
||||
exception
|
||||
when others =>
|
||||
Put_Line ("Something went wrong.");
|
||||
end Fork;
|
||||
Loading…
Add table
Add a link
Reference in a new issue