From: Roland McGrath Date: Tue, 27 Apr 1999 01:26:54 +0000 (+0000) Subject: 1999-04-27 Roland McGrath X-Git-Tag: cvs/glibc-2_1_1~124 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20d138126f0e4a51012406a7b8695dc82d5a57b1;p=thirdparty%2Fglibc.git 1999-04-27 Roland McGrath * hurd/hurdexec.c (_hurd_exec): If SIGKILL present in _hurdsig_traced set, pass EXEC_SIGTRAP flag in exec RPC. --- diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c index 2a283563b8e..18ad9ef38df 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,