Re: Process exit notifcation in a kext
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=qSIgGFOD4qUzpD07gCNhN2L/2/IIG6SIw1ukiKGZ1mE=; b=Xsbhsf2UOQIAziTAHUCbZwmLySE7uywxkLPlea7m37tbDl5ZlG9HpLrENbI7Bk9RyB cVyrE/FtgzEJUMAvQ9/o37xORGvDDPyN9Xwg8sO1QSDJb4KzjdFH3wynPp78H14pUI24 uF7WXf92QYjAiEUilRqZjVSp+akk6GW2ITEfM= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=XBrZp3dJEnXPXuXv0fccmncNhJ6aDXlUbDhXt9VJJOv0MPp3LHwPU6ATm6RqGa3q2L t27cUrNczijzM134J0hbuBAZcQIUrsnMitEVaopbLjLKwwAsGoZRbqUD1xZvxknmo7CA /bk0/pF1Bd6nD/1jRLc3L2nqg5SPmZTq8ul1g= On Wed, Jun 16, 2010 at 3:13 PM, Dave Keck <davekeck@gmail.com> wrote:
I mistakenly sent my last message off-list; you might want to put your reply on-list for more input.
Thank you for the reply. According to [1], PIDs are not reused, so I assume there's no need to worry about races with this approach.
I'm not sure what point that document is trying to make, but PIDs are most certainly reused as necessary. The only PID-reuse limitation that I'm aware of is that a PID can't be reused until its parent process has reaped it (otherwise waitpid() could fail.)
The relevant snippet is: "Every process has a process identification number (PID) that is assigned according to order it was run. The first process that runs has a PID of 1. The second has a PID of 2 and so on. If a process dies or is killed, that PID is not reused. If the computer is restarted, the process count begins at 1 again."
Perhaps you could give some details of what you're trying to accomplish?
I am using process exit notifications to clean up the list of PIDs for which traffic is filtered. Regards, Bogdan _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Bogdan Harjoc