Skip to content

Commit 7149d43

Browse files
committedMay 21, 2024
Merge branch 'topic/kill' into 'master'
We can't require process to be alive at `kill` call See merge request eng/ide/spawn!50
2 parents 806ae6d + c8d3359 commit 7149d43

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed
 

‎source/spawn/spawn-internal__glib_posix.adb

+4-8
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,11 @@ package body Spawn.Internal is
211211
------------------
212212

213213
procedure Kill_Process (Self : in out Process'Class) is
214-
use type Interfaces.C.int;
215-
216-
Code : constant Interfaces.C.int :=
214+
Ignore : constant Interfaces.C.int :=
217215
Spawn.Posix.kill
218216
(Self.pid, Interfaces.C.int (System.OS_Interface.SIGKILL));
219217
begin
220-
pragma Assert (Code = 0);
218+
null;
221219
end Kill_Process;
222220

223221
-----------------------
@@ -342,13 +340,11 @@ package body Spawn.Internal is
342340
-----------------------
343341

344342
procedure Terminate_Process (Self : in out Process'Class) is
345-
use type Interfaces.C.int;
346-
347-
Code : constant Interfaces.C.int :=
343+
Ignore : constant Interfaces.C.int :=
348344
Spawn.Posix.kill
349345
(Self.pid, Interfaces.C.int (System.OS_Interface.SIGTERM));
350346
begin
351-
pragma Assert (Code = 0);
347+
null;
352348
end Terminate_Process;
353349

354350
--------------------------

‎source/spawn/spawn-internal__posix.adb

+4-8
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,11 @@ package body Spawn.Internal is
9090
------------------
9191

9292
procedure Kill_Process (Self : in out Process'Class) is
93-
use type Interfaces.C.int;
94-
95-
Code : constant Interfaces.C.int :=
93+
Ignore : constant Interfaces.C.int :=
9694
Spawn.Posix.kill
9795
(Self.pid, Interfaces.C.int (System.OS_Interface.SIGKILL));
9896
begin
99-
pragma Assert (Code = 0);
97+
null;
10098
end Kill_Process;
10199

102100
----------------
@@ -174,13 +172,11 @@ package body Spawn.Internal is
174172
-----------------------
175173

176174
procedure Terminate_Process (Self : in out Process'Class) is
177-
use type Interfaces.C.int;
178-
179-
Code : constant Interfaces.C.int :=
175+
Ignore : constant Interfaces.C.int :=
180176
Spawn.Posix.kill
181177
(Self.pid, Interfaces.C.int (System.OS_Interface.SIGTERM));
182178
begin
183-
pragma Assert (Code = 0);
179+
null;
184180
end Terminate_Process;
185181

186182
--------------------------

0 commit comments

Comments
 (0)
Please sign in to comment.