Notification of fork()
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bYldjpiaaJcz/D6YOPsqD1AnNDq8WZtVPs1TrUlNbninUFspW09+tb5yImlTKScZntbudCNSx2cU/Jl/wpTb3qdEKYVKQxQKpWglMqxqurWuaeNLCCv7Lwc6jX5gFuHDpY48R+atT5magl7t90tw09kcvNWqViim4xJAj9WeqO8= Any chance that there is a way in which my kext can be made aware when a fork() occurs? I'm using kauth for purposes of exec() ... but it definitely doesn't appear to be applicable to simply fork()'ing. More generally, I would be content with simply knowing when a new process started. My real purpose: I'm trying to associate a process id and/or path-to-executable with incoming socket connections in my socket filter - as early in the process (ideally in the connect callback performed in the context of the listener) as possible. I use kauth so that I can (in limited but sufficient circumstances) know the path-to-executable for various processes. When one of those processes creates a listener, I can associate the two together. When that listener gets an incoming connection and the connect() callback is called in the context of that listener, I can then associate that incoming connection with a particular process ... until the annoyance of fork()'ing enters the picture. If I knew when fork() was called and the new pid, I could associate that new process with its parent process, and all would be well. Anyway ... I'm open to suggestions. Obviously if this were all working out the way I wanted it to, I wouldn't be posting this. -- Curtis Jones curtis.jones@gmail.com _______________________________________________ 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)
-
Curtis Jones