You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Andrew Black <ab...@roguewave.com> on 2006/08/14 19:22:50 UTC
[patch] Fix exec utility kill behavior
Greetings all.
Below is a one line patch (and changelog) to fix a bad mistake in the
kill behavior of the exec utility. I started looking into this issue as
a result of the locale or localedef utility apparently hanging on AIX.
This doesn't fix that issue, but it should kill things correctly.
--Andrew Black
Log:
exec.cpp (wait_for_child): Correct mistake in kill() call to kill child
process group rather than child process.
Index: exec.cpp
===================================================================
--- exec.cpp (revision 431382)
+++ exec.cpp (working copy)
@@ -458,7 +458,7 @@
}
/* ignore kill errors (perhaps should record them)*/
- (void)kill (child_pid, signals [siginx]);
+ (void)kill (-child_pid, signals [siginx]);
/* Record the signal used*/
state.killed = signals [siginx];
Re: [patch] Fix exec utility kill behavior
Posted by Martin Sebor <se...@roguewave.com>.
Andrew Black wrote:
> Greetings all.
>
> Below is a one line patch (and changelog) to fix a bad mistake in the
> kill behavior of the exec utility. I started looking into this issue as
> a result of the locale or localedef utility apparently hanging on AIX.
> This doesn't fix that issue, but it should kill things correctly.
Applied thus: http://svn.apache.org/viewvc?rev=431386&view=rev
Thanks
Martin
>
> --Andrew Black
>
> Log:
> exec.cpp (wait_for_child): Correct mistake in kill() call to kill
> child process group rather than child process.
>
> Index: exec.cpp
> ===================================================================
> --- exec.cpp (revision 431382)
> +++ exec.cpp (working copy)
> @@ -458,7 +458,7 @@
> }
>
> /* ignore kill errors (perhaps should record them)*/
> - (void)kill (child_pid, signals [siginx]);
> + (void)kill (-child_pid, signals [siginx]);
>
> /* Record the signal used*/
> state.killed = signals [siginx];