Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: detecting process termination in kernel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detecting process termination in kernel?



Oh, and if you do choose to use proc_find(), be sure to deref the proc
structure when it succeeds. (I had a bug in my code where I didn't always
do that and I don't recall exactly what Leopard did, but it wasn't pretty:-) Your code needs to look something like:
proc_t p;
p = proc_find(pid);
if (p == PROC_NULL)
/* no longer exists or in process (no pun) of exiting */
else
proc_rele(p);


rick

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.