summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-11-20 00:31:19 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-11-20 00:31:19 -0800
commita7db35b378d960071823a319bb781dc96b8eed7c (patch)
tree932906b1f7763f2524a2ae337523d9c032eee13d /lib-src
parentd7fcbbfe4a6f310814b45ee1a0aa7ccb458f0eb1 (diff)
downloademacs-a7db35b378d960071823a319bb781dc96b8eed7c.tar.gz
* emacsclient.c (handle_sigcont, handle_sigtstp): Use raise (sig)
rather than kill (getpid (), sig), as it's simpler and safer.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/emacsclient.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 926297b6dd3..67035773977 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * emacsclient.c (handle_sigcont, handle_sigtstp): Use raise (sig)
+ rather than kill (getpid (), sig), as it's simpler and safer.
+
2012-11-17 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (SYSWAIT_H): New macro.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 8d60d7961da..78079b5cf69 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1138,7 +1138,7 @@ handle_sigcont (int signalnum)
else
{
/* We are in the background; cancel the continue. */
- kill (getpid (), SIGSTOP);
+ raise (SIGSTOP);
}
signal (signalnum, handle_sigcont);
@@ -1165,7 +1165,7 @@ handle_sigtstp (int signalnum)
sigprocmask (SIG_BLOCK, NULL, &set);
sigdelset (&set, signalnum);
signal (signalnum, SIG_DFL);
- kill (getpid (), signalnum);
+ raise (signalnum);
sigprocmask (SIG_SETMASK, &set, NULL); /* Let's the above signal through. */
signal (signalnum, handle_sigtstp);