From 507a173f5077b86152feb665421f5e6d47b7c85c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 30 Jan 2014 18:22:30 +0100 Subject: [PATCH] Don't ignore SIGPROF in subprocesses * process.c (create_process): Reset SIGPROF handler in the child. * callproc.c (call_process): Likewise. --- src/ChangeLog | 5 +++++ src/callproc.c | 4 ++++ src/process.c | 3 +++ 3 files changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ea9db78185..f020386dc6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-01-30 Andreas Schwab + + * process.c (create_process): Reset SIGPROF handler in the child. + * callproc.c (call_process): Likewise. + 2014-01-29 Paul Eggert * xmenu.c (create_and_show_popup_menu): Port comment to C89. diff --git a/src/callproc.c b/src/callproc.c index 886bfcedb0..2ce4a7dcc0 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -677,6 +677,10 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, /* Emacs ignores SIGPIPE, but the child should not. */ signal (SIGPIPE, SIG_DFL); + /* Likewise for SIGPROF. */ +#ifdef SIGPROF + signal (SIGPROF, SIG_DFL); +#endif child_setup (filefd, fd_output, fd_error, new_argv, 0, current_dir); } diff --git a/src/process.c b/src/process.c index 94033fa7ee..85470b66c3 100644 --- a/src/process.c +++ b/src/process.c @@ -1841,6 +1841,9 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) signal (SIGINT, SIG_DFL); signal (SIGQUIT, SIG_DFL); +#ifdef SIGPROF + signal (SIGPROF, SIG_DFL); +#endif /* Emacs ignores SIGPIPE, but the child should not. */ signal (SIGPIPE, SIG_DFL); -- 2.20.1