Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,18 +0,0 @@
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;

View file

@ -1,49 +0,0 @@
@echo off
if "%1" neq "" goto %1 || echo Not a valid subroutine
echo Starting mySubroutine1
start "" "%~n0" mySubroutine1
echo.
echo Starting mySubroutine2 6 3
start "" "%~n0" mySubroutine2 6 3
echo.
echo Starting mySubroutine3
start "" "%~n0" mySubroutine3
echo.
:: We wait here for the subroutines to run, but they are running asynchronously
timeout /t 1
for /l %%i in (1,1,3) do (
for /f "tokens=*" %%j in (output%%i.txt) do (
set output%%i=%%j
del output%%i.txt
)
)
echo.
echo.
echo Return values
echo ----------------------------
echo mySubroutine1: %output1%
echo mySubroutine2: %output2%
echo mySubroutine3: %output3%
pause>nul
exit
:mySubroutine1
echo This is the result of subroutine1 > output1.txt
exit
:mySubroutine2
set /a result=%2+%3
echo %result% > output2.txt
exit
:mySubroutine3
echo mySubroutine1 hasn't been run > output3.txt
if exist output1.txt echo mySubroutine1 has been run > output3.txt
exit

View file

@ -1,30 +0,0 @@
identification division.
program-id. forking.
data division.
working-storage section.
01 pid usage binary-long.
procedure division.
display "attempting fork"
call "fork" returning pid
on exception
display "error: no fork linkage" upon syserr
end-call
evaluate pid
when = 0
display " child sleeps"
call "C$SLEEP" using 3
display " child task complete"
when < 0
display "error: fork result not ok" upon syserr
when > 0
display "parent waits for child..."
call "wait" using by value 0
display "parental responsibilities fulfilled"
end-evaluate
goback.
end program forking.