summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-03-18 22:10:48 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2012-03-18 22:10:48 +0100
commit146b944d4a968c2922f4220d33219ed3534f50d0 (patch)
tree971355dd08821a9c3d70a22a90513e2c051b89cf /process.c
parentf50e7141d5b5aedafa220d851a8b6afe753d679a (diff)
downloadstrace-146b944d4a968c2922f4220d33219ed3534f50d0.tar.gz
strace-146b944d4a968c2922f4220d33219ed3534f50d0.tar.bz2
strace-146b944d4a968c2922f4220d33219ed3534f50d0.tar.xz
Make internal_fork and internal_exec static
text data bss dec hex filename 237917 672 18980 257569 3ee21 strace 237845 672 18980 257497 3edd9 strace_new * defs.h: Remove declarations of internal_fork and internal_exec. * process.c: Remove definitions of internal_fork and internal_exec. * syscall.c: Move them here. (internal_syscall): Return void instead of int. We were always returning zero, and callers weren't checking it anyway. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'process.c')
-rw-r--r--process.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/process.c b/process.c
index ac184fa..2239d4a 100644
--- a/process.c
+++ b/process.c
@@ -531,34 +531,6 @@ sys_unshare(struct tcb *tcp)
}
int
-internal_fork(struct tcb *tcp)
-{
- if ((ptrace_setoptions
- & (PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK))
- == (PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK))
- return 0;
-
- if (!followfork)
- return 0;
-
- if (entering(tcp)) {
- /*
- * We won't see the new child if clone is called with
- * CLONE_UNTRACED, so we keep the same logic with that option
- * and don't trace it.
- */
- if ((sysent[tcp->scno].sys_func == sys_clone) &&
- (tcp->u_arg[ARG_FLAGS] & CLONE_UNTRACED))
- return 0;
- setbpt(tcp);
- } else {
- if (tcp->flags & TCB_BPTSET)
- clearbpt(tcp);
- }
- return 0;
-}
-
-int
sys_fork(struct tcb *tcp)
{
if (exiting(tcp))
@@ -961,21 +933,6 @@ sys_execve(struct tcb *tcp)
return 0;
}
-#if defined(TCB_WAITEXECVE)
-int
-internal_exec(struct tcb *tcp)
-{
- if (exiting(tcp) && syserror(tcp))
- tcp->flags &= ~TCB_WAITEXECVE;
- else {
- /* Maybe we have post-execve SIGTRAP suppressed? */
- if (!(ptrace_setoptions & PTRACE_O_TRACEEXEC))
- tcp->flags |= TCB_WAITEXECVE; /* no */
- }
- return 0;
-}
-#endif
-
#ifndef __WNOTHREAD
#define __WNOTHREAD 0x20000000
#endif