aboutsummaryrefslogtreecommitdiff
path: root/hurd/hurdexec.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-04-27 01:26:54 +0000
committerRoland McGrath <roland@gnu.org>1999-04-27 01:26:54 +0000
commit20d138126f0e4a51012406a7b8695dc82d5a57b1 (patch)
tree662a89b2530543aeb5263a6c661edeee7d589fba /hurd/hurdexec.c
parentd8aaef00a787dc18ce87e4c6448615095d511239 (diff)
downloadglibc-20d138126f0e4a51012406a7b8695dc82d5a57b1.tar
glibc-20d138126f0e4a51012406a7b8695dc82d5a57b1.tar.gz
glibc-20d138126f0e4a51012406a7b8695dc82d5a57b1.tar.bz2
glibc-20d138126f0e4a51012406a7b8695dc82d5a57b1.zip
1999-04-27 Roland McGrath <roland@baalperazim.frob.com>
* hurd/hurdexec.c (_hurd_exec): If SIGKILL present in _hurdsig_traced set, pass EXEC_SIGTRAP flag in exec RPC.
Diffstat (limited to 'hurd/hurdexec.c')
-rw-r--r--hurd/hurdexec.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c
index 2a283563b8..18ad9ef38d 100644
--- a/hurd/hurdexec.c
+++ b/hurd/hurdexec.c
@@ -189,6 +189,8 @@ _hurd_exec (task_t task, file_t file,
/* The information is all set up now. Try to exec the file. */
{
+ int flags;
+
if (pdp)
{
/* Request the exec server to deallocate some ports from us if the exec
@@ -204,7 +206,15 @@ _hurd_exec (task_t task, file_t file,
*pdp++ = dtable[i];
}
- err = __file_exec (file, task, 0,
+ flags = 0;
+#ifdef EXEC_SIGTRAP
+ /* PTRACE_TRACEME sets all bits in _hurdsig_traced, which is propagated
+ through exec by INIT_TRACEMASK, so this checks if PTRACE_TRACEME has
+ been called in this process in any of its current or prior lives. */
+ if (__sigismember (&_hurdsig_traced, SIGKILL))
+ flags |= EXEC_SIGTRAP;
+#endif
+ err = __file_exec (file, task, flags,
args, argslen, env, envlen,
dtable, MACH_MSG_TYPE_COPY_SEND, dtablesize,
ports, MACH_MSG_TYPE_COPY_SEND, _hurd_nports,