}
void
-__gnat_kill (int pid, int sig, int close ATTRIBUTE_UNUSED)
+__gnat_kill (int pid, int sig)
{
#if defined(_WIN32)
HANDLE h;
if (hSnap == INVALID_HANDLE_VALUE)
{
- __gnat_kill (pid, sig_num, 1);
+ __gnat_kill (pid, sig_num);
return;
}
/* kill process */
- __gnat_kill (pid, sig_num, 1);
+ __gnat_kill (pid, sig_num);
#elif defined (__vxworks)
/* not implemented */
if (!dir)
{
- __gnat_kill (pid, sig_num, 1);
+ __gnat_kill (pid, sig_num);
return;
}
/* 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.
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
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);
-- 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;
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;