public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: cagney@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Include the signal name/number in a kill fail error.
Date: Mon, 10 Mar 2008 18:14:00 -0000	[thread overview]
Message-ID: <20080310181401.10921.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  28062866fd08a4ae6ceffcce19f1f801638ab8c6 (commit)
      from  63ac2a8e2f12fd140f2a7bd6335f286512460da9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 28062866fd08a4ae6ceffcce19f1f801638ab8c6
Author: Andrew Cagney <cagney@redhat.com>
Date:   Mon Mar 10 14:12:53 2008 -0400

    Include the signal name/number in a kill fail error.
    
    frysk-sys/frysk/sys/ChangeLog
    2008-03-10  Andrew Cagney  <cagney@redhat.com>
    
    	* Signal.java-sh (kill, tkill): Add String name parameter.
    	* cni/Signal.cxx-sh (kill, tkill): Include the signal name/number
    	in the error message.

-----------------------------------------------------------------------

Summary of changes:
 frysk-sys/frysk/sys/ChangeLog         |    6 ++++++
 frysk-sys/frysk/sys/Signal.java-sh    |    8 ++++----
 frysk-sys/frysk/sys/cni/Signal.cxx-sh |   15 +++++++++------
 3 files changed, 19 insertions(+), 10 deletions(-)

First 500 lines of diff:
diff --git a/frysk-sys/frysk/sys/ChangeLog b/frysk-sys/frysk/sys/ChangeLog
index 10d62ac..302da57 100644
--- a/frysk-sys/frysk/sys/ChangeLog
+++ b/frysk-sys/frysk/sys/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-10  Andrew Cagney  <cagney@redhat.com>
+
+	* Signal.java-sh (kill, tkill): Add String name parameter.
+	* cni/Signal.cxx-sh (kill, tkill): Include the signal name/number
+	in the error message.
+
 2008-03-04  Andrew Cagney  <cagney@redhat.com>
 
 	* Fork.java (spawn(File,String,String,String,String[],int)): New.
diff --git a/frysk-sys/frysk/sys/Signal.java-sh b/frysk-sys/frysk/sys/Signal.java-sh
index 2bca733..3d3c4b4 100644
--- a/frysk-sys/frysk/sys/Signal.java-sh
+++ b/frysk-sys/frysk/sys/Signal.java-sh
@@ -103,16 +103,16 @@ public class Signal implements Comparable {
      * Deliver SIG to process PID.
      */
     public void kill(ProcessIdentifier pid) {
-	kill(pid.intValue(), this.intValue());
+	kill(pid.intValue(), this.intValue(), this.name);
     }
-    private static native void kill(int pid, int signum);
+    private static native void kill(int pid, int signum, String name);
     /**
      * Deliver SIGNAL to task (or thread) LWP.
      */
     public final void tkill(ProcessIdentifier lwp) {
-	tkill(lwp.intValue(), this.intValue());
+	tkill(lwp.intValue(), this.intValue(), this.name);
     }
-    private static native void tkill(int lwp, int signum);
+    private static native void tkill(int lwp, int signum, String name);
 
     /**
      * Momentarialy sets the signal handler for Sig to SIGIGN so that
diff --git a/frysk-sys/frysk/sys/cni/Signal.cxx-sh b/frysk-sys/frysk/sys/cni/Signal.cxx-sh
index 4f1a900..fb645db 100644
--- a/frysk-sys/frysk/sys/cni/Signal.cxx-sh
+++ b/frysk-sys/frysk/sys/cni/Signal.cxx-sh
@@ -47,26 +47,29 @@ cat <<EOF
 #include <linux/unistd.h>
 #include <errno.h>
 #include <stdio.h>
+#include <linux.syscall.h>
+#include <unistd.h>
+#include <alloca.h>
 
 #include <gcj/cni.h>
 
 #include "frysk/sys/Signal.h"
 #include "frysk/sys/cni/Errno.hxx"
-#include <linux.syscall.h>
-#include <unistd.h>
 
 void
-frysk::sys::Signal::tkill(jint tid, jint signum) {
+frysk::sys::Signal::tkill(jint tid, jint signum, jstring name) {
   errno = 0;
   if (::syscall (__NR_tkill, tid, signum) < 0)
-    throwErrno (errno, "tkill", "task %d", (int)tid);
+    throwErrno(errno, "tkill", "task %d, signal %s (%d)",
+               (int)tid, ALLOCA_STRING(name), (int)signum);
 }
 
 void
-frysk::sys::Signal::kill(jint pid, jint signum) {
+frysk::sys::Signal::kill(jint pid, jint signum, jstring name) {
   errno = 0;
   if (::kill (pid, signum) < 0)
-    throwErrno (errno, "kill", "process %d", (int)pid);
+    throwErrno(errno, "kill", "process %d, signal %s (%d)",
+               (int)pid, ALLOCA_STRING(name), (int)signum);
 }
 
 void


hooks/post-receive
--
frysk system monitor/debugger


                 reply	other threads:[~2008-03-10 18:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080310181401.10921.qmail@sourceware.org \
    --to=cagney@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).