kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Parent PID for kthreads?
@ 2019-09-11 18:54 Martin Galvan
  0 siblings, 0 replies; only message in thread
From: Martin Galvan @ 2019-09-11 18:54 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

I'm looking for a way to determine the PID of the process on which
kthread_create is invoked to spawn a new kthread. The newly created
kthreads all show current->parent->pid == 2, which I understand
corresponds to kthreadd. current->tgid doesn't seem to be set to the
main process' PID either. Is there a way to determine this from within
the kthread? Thanks!

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-11 18:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 18:54 Parent PID for kthreads? Martin Galvan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).