L'objectif est de faire un simple ls . J'ai commenté .
lancement :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 WITH GNAT.OS_Lib ; USE GNAT.OS_Lib ; WITH Ada.Text_IO ; USE Ada.Text_IO ; procedure console_Ada is state_spawn : boolean ; fake_arg : Argument_List ( 1..1 ) ; -- i don't want a argument at all begin Spawn ( "/bin/ls" , fake_arg , state_spawn ); put ( " Spawn Success ? : " & Boolean'Image( state_spawn ) ) ; -- the program doesn't even get there . end console_Ada ;
Code : Sélectionner tout - Visualiser dans une fenêtre à part raised STORAGE_ERROR : stack overflow (or erroneous memory access)
Partager