[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
This commit is contained in:
Dmitriy Anisimkov 2019-07-08 08:14:50 +00:00 committed by Pierre-Marie de Rodat
parent 4fe5bbcf30
commit 3a4a60d1d2
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,7 @@
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>
* sem_util.adb (Enclosing_Package_Or_Subprogram): Do not expect

View file

@ -1629,10 +1629,12 @@ package body System.OS_Lib is
pragma Import (C, C_Kill, "__gnat_kill");
begin
if Hard_Kill then
C_Kill (Pid, SIGKILL, 1);
else
C_Kill (Pid, SIGINT, 1);
if Pid /= Invalid_Pid then
if Hard_Kill then
C_Kill (Pid, SIGKILL, 1);
else
C_Kill (Pid, SIGINT, 1);
end if;
end if;
end Kill;