Re: XNU sys_fork syscall (0x02). Linux vs XNU
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On 29 Apr 2008, at 18:53, Robert Spykerman wrote: Good luck! JP -- John Davidorff Pell john@gaelicWizard.net _______________________________________________ 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... ... and I'm just having a bit of trouble understanding what actually is going on when I call a sys_fork. I think this is your problem. You are making a syscall. Mac OS X (aka Darwin) does not support making syscalls. This may sound ridiculous to you, but let me explain: The libSystem library can be thought of as a user-land component of the kernel. The syscall interface to the kernel changes often and is effectively undocumented. You might be able to reverse engineer it, but the next point-release will kill your code. Only libSystem can be trusted to make syscalls because, from outside-of-apple-point-of-view, libSystem is part of the kernel. Now, in real life, libSystem is obviously not part of the kernel, but it is updated in lock-step with the kernel. If a new kernel build is pushed out that has changed the syscall interface, then a new libSystem build is pushed out *in the same package*. Final answer: don't make syscalls, call the equivalent functions from libSystem. This email sent to site_archiver@lists.apple.com
participants (1)
-
John Davidorff Pell