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.
This commit is contained in:
Roland McGrath 1999-04-27 01:26:54 +00:00
parent d8aaef00a7
commit 20d138126f
1 changed files with 11 additions and 1 deletions

View File

@ -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,