Commit 3a4a60d1 by Dmitriy Anisimkov Committed by Pierre-Marie de Rodat

[Ada] Os_Lib: do not call __gnat_kill for Invalid_Pid

2019-07-08  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

	* libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.

From-SVN: r273223
parent 4fe5bbcf
2019-07-08 Dmitriy Anisimkov <anisimko@adacore.com>
* libgnat/s-os_lib.adb: Do not call __gnat_kill for Invalid_Pid.
2019-07-08 Piotr Trojanek <trojanek@adacore.com> 2019-07-08 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect * sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect
......
...@@ -1629,10 +1629,12 @@ package body System.OS_Lib is ...@@ -1629,10 +1629,12 @@ package body System.OS_Lib is
pragma Import (C, C_Kill, "__gnat_kill"); pragma Import (C, C_Kill, "__gnat_kill");
begin begin
if Hard_Kill then if Pid /= Invalid_Pid then
C_Kill (Pid, SIGKILL, 1); if Hard_Kill then
else C_Kill (Pid, SIGKILL, 1);
C_Kill (Pid, SIGINT, 1); else
C_Kill (Pid, SIGINT, 1);
end if;
end if; end if;
end Kill; end Kill;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment