diff options
author | Mattias Andrée <maandree@kth.se> | 2020-05-31 23:22:22 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-05-31 23:22:22 +0200 |
commit | be1c092cd99a023b3d4178066925b644feb0565f (patch) | |
tree | ea5fd38c39aacdc93b55fa8fc9271ad523032f7c /common.h | |
parent | m (diff) | |
download | sctrace-be1c092cd99a023b3d4178066925b644feb0565f.tar.gz sctrace-be1c092cd99a023b3d4178066925b644feb0565f.tar.bz2 sctrace-be1c092cd99a023b3d4178066925b644feb0565f.tar.xz |
Tracing fork children does not work
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | common.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -79,10 +79,11 @@ enum state { struct process { pid_t pid; - pid_t thread_group_leader; + pid_t thread_leader; struct process *next; struct process *prev; enum state state; + int silent_until_execed; /* Syscall data */ unsigned long long int scall; @@ -119,4 +120,7 @@ void remove_process(struct process *proc); /* util.c */ void setup_trace_output(FILE *fp, int multiprocess); void tprintf(struct process *proc, const char *fmt, ...); -_Noreturn void eprintf(const char *fmt, ...); +void weprintf(const char *fmt, ...); +#define eprintf(...) (weprintf(__VA_ARGS__), exit(1)) +#define eprintf_and_kill(PID, ...) (weprintf(__VA_ARGS__), kill((PID), SIGKILL), exit(1)) +FILE *xfopen(const char *file, const char *mode); |