diff options
author | Dmitriy Anisimkov <anisimko@adacore.com> | 2021-12-21 13:49:40 +0600 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-09 09:27:28 +0000 |
commit | 6b4c99cc92242903c81a7168d467269197955269 (patch) | |
tree | fee457a2a69d662a2b8343cd957b90b7a1a894b3 | |
parent | 9a6f7575c153e7036152002bb7b58166762592f1 (diff) | |
download | gcc-6b4c99cc92242903c81a7168d467269197955269.zip gcc-6b4c99cc92242903c81a7168d467269197955269.tar.gz gcc-6b4c99cc92242903c81a7168d467269197955269.tar.bz2 |
[Ada] Remove unused parameter from __gnat_kill
Remove close parameter from __gnat_kill because it is not used in
implementation.
gcc/ada/
* adaint.c (__gnat_kill): Remove close parameter.
(__gnat_killprocesstree): Do not provide close parameter on call
to __gnat_kill.
* libgnat/g-expect.adb (Kill): Remove Close parameter.
(Close): Do not provide Close parameter on call to Kill.
(Send_Signal): Do not provide Close parameter on call to Kill.
* libgnat/s-os_lib.adb (Kill): Do not provide close parameter on
call to __gnat_kill.
-rw-r--r-- | gcc/ada/adaint.c | 12 | ||||
-rw-r--r-- | gcc/ada/libgnat/g-expect.adb | 6 | ||||
-rw-r--r-- | gcc/ada/libgnat/s-os_lib.adb | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 591d033..2ae4ded 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -3556,7 +3556,7 @@ __gnat_get_executable_load_address (void) } void -__gnat_kill (int pid, int sig, int close ATTRIBUTE_UNUSED) +__gnat_kill (int pid, int sig) { #if defined(_WIN32) HANDLE h; @@ -3595,7 +3595,7 @@ void __gnat_killprocesstree (int pid, int sig_num) if (hSnap == INVALID_HANDLE_VALUE) { - __gnat_kill (pid, sig_num, 1); + __gnat_kill (pid, sig_num); return; } @@ -3618,7 +3618,7 @@ void __gnat_killprocesstree (int pid, int sig_num) /* kill process */ - __gnat_kill (pid, sig_num, 1); + __gnat_kill (pid, sig_num); #elif defined (__vxworks) /* not implemented */ @@ -3635,7 +3635,7 @@ void __gnat_killprocesstree (int pid, int sig_num) if (!dir) { - __gnat_kill (pid, sig_num, 1); + __gnat_kill (pid, sig_num); return; } @@ -3673,9 +3673,9 @@ void __gnat_killprocesstree (int pid, int sig_num) /* kill process */ - __gnat_kill (pid, sig_num, 1); + __gnat_kill (pid, sig_num); #else - __gnat_kill (pid, sig_num, 1); + __gnat_kill (pid, sig_num); #endif /* Note on Solaris it is possible to read /proc/<PID>/status. The 5th and 6th words are the pid and the 7th and 8th the ppid. diff --git a/gcc/ada/libgnat/g-expect.adb b/gcc/ada/libgnat/g-expect.adb index 1c5b831..56554c0 100644 --- a/gcc/ada/libgnat/g-expect.adb +++ b/gcc/ada/libgnat/g-expect.adb @@ -96,7 +96,7 @@ package body GNAT.Expect is procedure Dup2 (Old_Fd, New_Fd : File_Descriptor); pragma Import (C, Dup2); - procedure Kill (Pid : Process_Id; Sig_Num : Integer; Close : Integer); + procedure Kill (Pid : Process_Id; Sig_Num : Integer); pragma Import (C, Kill, "__gnat_kill"); -- if Close is set to 1 all OS resources used by the Pid must be freed @@ -223,7 +223,7 @@ package body GNAT.Expect is begin if Descriptor.Pid > 0 then -- see comment in Send_Signal - Kill (Descriptor.Pid, Sig_Num => 9, Close => 0); + Kill (Descriptor.Pid, Sig_Num => 9); end if; Close_Input (Descriptor); @@ -1347,7 +1347,7 @@ package body GNAT.Expect is -- started; we don't want to kill ourself in that case. if Descriptor.Pid > 0 then - Kill (Descriptor.Pid, Signal, Close => 1); + Kill (Descriptor.Pid, Signal); -- ??? Need to check process status here else raise Invalid_Process; diff --git a/gcc/ada/libgnat/s-os_lib.adb b/gcc/ada/libgnat/s-os_lib.adb index 0681580..5af6586 100644 --- a/gcc/ada/libgnat/s-os_lib.adb +++ b/gcc/ada/libgnat/s-os_lib.adb @@ -1602,15 +1602,15 @@ package body System.OS_Lib is SIGKILL : constant := 9; SIGINT : constant := 2; - procedure C_Kill (Pid : Process_Id; Sig_Num : Integer; Close : Integer); + procedure C_Kill (Pid : Process_Id; Sig_Num : Integer); pragma Import (C, C_Kill, "__gnat_kill"); begin if Pid /= Invalid_Pid then if Hard_Kill then - C_Kill (Pid, SIGKILL, 1); + C_Kill (Pid, SIGKILL); else - C_Kill (Pid, SIGINT, 1); + C_Kill (Pid, SIGINT); end if; end if; end Kill; |