Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6414

is there a way to tell the parent thread from current

$
0
0

From the current thread (in kernel) is there a way to tell the actual thread that fork'd it?

systemd -> proc1 --fork--> thread2

thread2 detaches; thread2's parent set to systemd; thread2's tgid set to its pid;

I see that the detached threads have their parent/real_parent set to the parent systemd

Is there a way to reliably tell the parent proc/thread (proc1) from thread2's current (task_info struct)?


Viewing all articles
Browse latest Browse all 6414


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>