public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-174] [Ada] Remove unused parameter from __gnat_kill
@ 2022-05-09  9:30 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-09  9:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6b4c99cc92242903c81a7168d467269197955269

commit r13-174-g6b4c99cc92242903c81a7168d467269197955269
Author: Dmitriy Anisimkov <anisimko@adacore.com>
Date:   Tue Dec 21 13:49:40 2021 +0600

    [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.

Diff:
---
 gcc/ada/adaint.c             | 12 ++++++------
 gcc/ada/libgnat/g-expect.adb |  6 +++---
 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 591d033fbca..2ae4dedeb2b 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 1c5b8312d7c..56554c01bcd 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 0681580b9b2..5af65866b2b 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-09  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  9:30 [gcc r13-174] [Ada] Remove unused parameter from __gnat_kill Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).