Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --
- --
- function C_Fork return C.int;
- pragma Import (C, C_Fork, "fork");
- function Fork return Integer is
- ReturnVAR : Integer;
- Fork_Failed : exception;
- begin
- ReturnVAR := Integer(C_Fork);
- if ReturnVAR = -1 then
- raise Fork_Failed;
- end if;
- return ReturnVAR;
- exception
- when Fork_Failed =>
- Text_IO.Put_Line (Text_IO.Standard_Error,
- "Fork call failed.");
- return ReturnVAR;
- when others =>
- Text_IO.Put_Line (Text_IO.Standard_Error,
- "Exception raised in Fork call.");
- raise;
- end Fork;
Add Comment
Please, Sign In to add comment