Discussion:
Lookup_Thread in Sys_Wait
(too old to reply)
Eran Kravitz
2005-09-14 01:55:13 UTC
Permalink
I was playing with the Lookup_Thread function in Sys_Wait() and I
believe it simply returns a kernel_thread pointer to the thread you look
for ONLY IF it has a parent. Otherwise it returns null. Is that correct?

If so, would that be a reliable way to figure out whether a process has
a parent or not? Or since there are other cases in which Lookup_Thread
might return null (although they are not likely, for example, process
simply not found for whatever reason) we shouldn't rely on that?

Thank you.
Shadan Haghani
2005-09-16 03:47:04 UTC
Permalink
I think that you can run it whether or not the caller thread is a parent.
Just modify the second parameter.

Shadan
I was playing with the Lookup_Thread function in Sys_Wait() and I believe
it simply returns a kernel_thread pointer to the thread you look for ONLY
IF it has a parent. Otherwise it returns null. Is that correct?
If so, would that be a reliable way to figure out whether a process has a
parent or not? Or since there are other cases in which Lookup_Thread might
return null (although they are not likely, for example, process simply not
found for whatever reason) we shouldn't rely on that?
Thank you.
Loading...