Re: XNU sys_fork syscall (0x02). Linux vs XNU
Re: XNU sys_fork syscall (0x02). Linux vs XNU
- Subject: Re: XNU sys_fork syscall (0x02). Linux vs XNU
- From: John Davidorff Pell <email@hidden>
- Date: Tue, 29 Apr 2008 19:05:31 -0700
On 29 Apr 2008, at 18:53, Robert Spykerman wrote:
... 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.
Good luck!
JP
--
John Davidorff Pell
email@hidden
_______________________________________________
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