From 57c74b1abbbed6428a05fd080fc22112d850093b Mon Sep 17 00:00:00 2001 From: mykola2312 <49044616+mykola2312@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:58:30 +0300 Subject: [PATCH] add hijack destination function to dummy for thread hijacking testing --- src/dummy_target.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dummy_target.c b/src/dummy_target.c index cfa9a3e..1d077d6 100644 --- a/src/dummy_target.c +++ b/src/dummy_target.c @@ -49,9 +49,16 @@ __attribute__((noreturn)) void* slave3_job(void*) } } +__attribute__((noreturn)) void* hijack_destination(void*) +{ + puts("thread has been redirected to this function! cool!"); + while (1) sleep(1); +} + int main() { status("master"); + printf("hijack_destination: %p\n", hijack_destination); pid_t slave1 = fork(); if (!slave1) slave1_job();